Suggestions for In-browser word editing - java

I work at a transcription company that stores physician's transcriptions on a central file server. Users are able to access our website and open up the transcription (a .doc file) to view, edit, e-sign, print, ect.
Currently, when the user goes to open the document, it uses a Java application and the local computer's Microsoft Word to open an instance of the document. Currently there are limitations to the application though.
Only Windows OS compatible (due to the Java COM operation)
Only 32-bit Java compatible
Difficult to replicate for mobile application
My question was, is it possible to have an in-browser editor, with the functionality of Word, that is able to pull and open Microsoft Word documents from a file server and allow users to make edits and save them across Windows and Apple OS, with possible mobile app integration as well?
A friend at Google suggested using Google Docs, which would require google accounts and a BA agreement, creating a little too much work on the client side. Any suggestions would help.
Thank you!

Of course a native docx editor would be best, however, you can convert to XHTML, edit with CKEditor, then convert back to docx.
This blog post of mine ignores the details/intricacies involved in doing that, instead jumping ahead to explain how to track content through that process.

Related

Embedding Microsoft Word in a browser window (cross-browser)

Background
Our web application stores Microsoft Word documents which users want to edit (ideally with Word) in their browser of choice.
To access the web application (and the documents), users must login. As they are unwilling to login whenever they edit a document, document retrieval and storage must occur in their login session, which is easiest to accomplish if document download and upload is done by the browser.
Question
How can I embed Word into (or at least invoke it from) a browser window to edit a document the browser has retrieved from the server? It should work in both Internet Explorer and Firefox.
Own Research
ActiveX is not supported by Firefox.
There is not javascript api for invoking (let alone embed) native applications. Even if there were, I don't see how I could pass the document, and neither Internet Explorer 10 not Firefox 20 appears to offer an api to write a file to disk.
I could write a (signed) Java Applet to invoke Word, but ensuring that all changes are uploaded to the server appears difficult (what if the user closes the browser window before saving in Word?)
Eclipse has this nice feature of permitting in place editing word documents. This appears to be part of their SWT toolkit, but as that requires native code, I am not sure how to deploy it is an applet?
I don't know if they are embeddable for free, but you can take a look at Microsoft Office Webapps

How to open and edit a file(doc,pdf,excel etc) in browser window using zk?

I have a application which is created on ZK Framework , i want to give user a functionality where user can open a saved file in edit mode and then again saved the changed in database can any one know which API can help me to do this?
You could use Google Apps to do so and set Google Docs to edit your DOC, PDF or even XLS extension files. For more help on setting it up, feel free to ask again. :)
The problem you're posing doesn't have a simple answer, unfortunately.
There are two general approaches you could take..
The low hanging fruit is to provide an interface for the user to download a file and upload it after they make edits using whichever editing software they choose / is appropriate.
The other approach would be to provide a GUI to edit files. Regardless of the web framework you are using, this is a daunting task to say the least. As #userRandom mentioned, this is a large part of what Google Drive (formerly Google Docs) is attempting to solve.. but even Google's solution is not perfect and very much a work in progress.
I would strongly suggest evaluating the scope of your project before proceeding.
If you choose to move forward, consider a simple solution that works for .txt files. Then, consider how you might handle .doc files. Then, PDF files, XLS files, etc.
Folks here will be able to answer specific questions.

How to program a browser integration with an external editor like MS Word in Java?

You may all have seen online content management systems or publishing platforms, where one can edit a page, but for convenience, the editing is not done in the browser, but instead in Microsoft Word. So whenever you open the page to edit it, the current page is send to MS Word and after completing the editing, Word sends back the page to the server.
A good example is Confluence. Instead of using the built-in WYSIWYG editor, you can also edit a page in MS Word.
How does this work technically? I want to program something similar on a Java servlet based web app. The first part is easy. I convert my page into the format of the external application and send it to the browser setting the correct mimetype. The external application will open the document. But I have no idea how the second part works. How does this application sends the file back?
Please send me any pointers you might have. My main problem is probably that I really don't know what I should search for. Also, if you know any opensource Java based projects doing something similar, I would like to study them to get started.
PS: Please feel free to change the title of this question!
One way this works is if you start Microsoft Word not wih a file as an argument, but witha n http/https URL that points to a WebDAV-supporting location. In this case Word will send the file bach witha PUT method when saving.

How can i determine using java what sites have been opened up in browsers?

I need to understand the directions in need to look into to Writing a program that figures out what all websites have been hit by a user using his browser. I want to write a standalone program. Can anybody direct me to some API which may help me figure this out.
Well, first of all that depends on which browser do you need to check. I'm guessing that you need to check the currently set default system browser. Anyway, that will require a lot of browser research and few JNI calls.
To find a default browser you would need to check HKEY_CLASSES_ROOT\http\shell\open\command (for Windows) and various configuration files under different linux for different window managers.
Then you would need to read the history of the specific browser from the format of that browser. For example, Firefox stores it's history in sqlite format in the profile directory in places.sqlite file. Chrome on other hand stores it in %home%/User Data/Default/history. So you would need a separate parser for each browser.
Basically, if you need a universal browser history reader - it's a load of work and research.
As it was clarified by the author in his comments - he needs to check what is user currently browsing.
The only truly browser and OS independent way is through proxy. You need to create a HTTP(S) proxy with Java (there are some implementations out there already) and then reconfigure the desired browser to use the proxy running at localhost. When your proxy is used - it will be able to track every bit of traffic the user tries to load.
This information is stored in a SQLite database in firefox:
The file "places.sqlite" stores the annotations, bookmarks, favorite
icons, input history, keywords, and browsing history (a record of
visited pages).
http://kb.mozillazine.org/Places.sqlite
Other browsers probably have similar approaches.
Any language with drivers for SQLite, and that includes Java, C, C#, C++, ruby, and, yes, even javascript, should be equally capable of accessing this database.
Speaking for myself, I would be interested collaborating on such a stand-alone program in Java should the OP put his code on github.

Is it possible to automate excel from a java applet running in full trust?

I'm looking at all possible languages to solve a particular business case problem.
Basically need a way to allow user to browse for an excel file locally, then using Microsoft Excel COM automation, read in the cell contents and from this point on perform some actions.
I have no experience with Java, but I know this type of thing is "almost" possible using Silverlight 4.0. Here is a line of code that demonstates how you begin automation in silverlight using c#:
dynamic objExcel = AutomationFactory.CreateObject("Excel.Application");
Problem is Silverlight only opens files from "My Documents", and it seems there is nothing you can do to allow the app full access to the file system to read in any file. So I'm investigating if Java is capable of this task?
I don't need a big explanation on how to do it, mainly I just need your experience as a Java developer to say - Yes in principle its certainly possible, or not. I need to open this xls file from any location the user specifies.
So 2 things really:
Can you browse and open any file using a trusted java applet? And get access to the files path from the open dialog?
Can you automate MS Word / Excel from a Java applet.
Thanks
..Silverlight only opens files from "My Documents", ..
Java will not be able to break that security restriction.
It is for the benefit of the end user, in that if they truly want to edit the Excel file, they will save or move it to My Documents. If they cannot do that, then perhaps they should not be altering the file.

Categories

Resources