Tthis office viewer component could retrieve and save the physical files form the server when we provide the respective file paths.  This component also support to load/save the content of the documents through RTF formatted strings. These strings will be saved and retrieved as it is from the database. The developers can write javascript functions within JSPs to provide access to javascript variables to take these RTF formatted string values.

Firstly, the component can open a rtf file from server with the stream mode.

Referent the following page to write a page in your server to read file to stream.

Then use the following javascript to load the file into component.

<script language=”vbscript”>
Sub DownloadFile()
EDOffice.HttpAddpostString(“DocumentID”, “name.rtf”);
EDOffice.HttpOpenFileFromStream(“http://localhost:2440/ASPCSharp/UploadAction.aspx”, “Word.Application”);
End Sub

To save rtf file back to server, you need call the following method.

<script language=”vbscript”>
Sub UploadFile()
EDOffice.HttpAddpostString “author”, “anyname”
EDOffice.HttpAddpostString “Data”, “2010-5-15″
EDOffice.HttpAddPostOpenedFile filename.rtf,  6                 ;wdFormatRTF = 6,
EDOffice.HttpPost “http://localhost:1320/Samples/UploadAction.aspx”
End Sub
< /script>