Tips on working with large documents

114 views
Skip to first unread message

Kevin Kuo

unread,
Jan 25, 2013, 2:57:47 PM1/25/13
to pdfnet-w...@googlegroups.com
For the best viewing experience with large documents, avoid using streaming to serve the xod file.

Streaming refers to converting a PDF to XOD on-the-fly when a client requests it. The reason for using streaming is to allow the WebViewer to start rendering AS the document is converting.
There are two issues here:
-when streaming, the WebViewer client must download the whole xod file. The client viewer will be slower and take up more memory.
-converting the PDF over-and-over again is inefficient for the viewer.


The alternative to streaming is converting the PDF-to-XOD ahead of time.
Once you have the XOD file, you can serve the file directly to the client viewer.
The WebViewer client uses byte range requests to download only parts of the XOD file at a time, so the performance is much better than streaming the whole file.
The downside here is that users must wait until the conversion process has completed before it can render the pages. But the overall experience is much smoother, especially for large documents.


Below are two scenarios for using non-streaming mode.

A scenario where the set of source documents are static
-You want to add new documents for your application, you convert your PDF's to XOD, upload them to your server. In your database, store the URL location of the XOD file
-When a user requests to view a document, your server can check permissions, and then give back the URL to the XOD file
-The user's WebViewer will load the document from the URL specified.


A scenario where the set of source documents are dynamic
-user wants to view a document in WebViewer, they upload their PDF document to your server
-your server takes the file and tries to convert it. In the mean time, it sends back a page indicating "loading"
-when the conversion has completed on the server, you have a URL to the XOD file. Store it.
-notify the user that the XOD is ready, the user's WebViewer will now load that new XOD URL
Reply all
Reply to author
Forward
0 new messages