Java how to open the edit word documents online?

Often encounter online demand for Office documents in general OA project, first download the file, edit, save and then select the file upload way too original, is now a well in the era of Office Online, the user can not accept this lame mode of operation.

Although Microsoft Office Online is also the major promoter, can be created by using Office 365 free Office Online applications together, share more, to achieve more targeted collaborate on Word documents, etc., but Microsoft Office Online is an internal closed system account using Microsoft's own official user accounts, file server storage data is handed over to Microsoft, does not provide development interface for document processing flow and content control, we now have in the development of OA project, mainstream online processing Word files implementation or use Word controls (also known as Office control), but these controls is essentially a browser page controls, and controls flash video sites use the same development techniques.

Currently on the market support online editing a document word plug-in has a lot, but there are some many years ago began a free plug-in. Due to plug-in technology of the complexity and recent operating system, browser environment, Office version of drastic changes and other factors, free plug-in has already been eliminated, the paid plug-ins more commonly used is PageOffice up, PageOffice encapsulates server-side Java programming objects, control the performance of the client control word, on the whole the interface is easy to use, for example, open a word file online, the background takes only a few lines of code below:

PoCtrl1 = new new PageOfficeCtrl PageOfficeCtrl (Request); 
poCtrl1.setServerPage ( "poserver.zz"); 
poCtrl1.setSaveFilePage ( "savefile.jsp"); // handle files saved work 
poCtrl1.webOpen ( "doc / test.doc", OpenModeType .docNormalEdit, "Joe Smith"); // open file

The need arises in the page position Word interface insertion getHtmlCode method returns html code.

String htmlCode = poCtrl1.getHtmlCode("PageOfficeCtrl1");

PageOffice latest version provides compatibility with all browsers solutions in support of basic online office document editing is also provided on the trail reserves, dynamic fill, merge files, extract the data in the document and other functions in general is a good choice .

Guess you like

Origin www.cnblogs.com/qingxue636/p/11511463.html