How does WebViewer deal with large files?

How do you handle large files on the client? Do you load the whole file?
Do we really need to convert the whole file to XOD? Can this be broken into parts?


WebViewer was designed to be able to show large documents without having to load the entire file. First off, the XOD is web-optimized, which means that during the conversion process, document resources are resized and linearized.

By using byte range requests on the XOD file, the WebViewer client will only request parts of the file at a time, just enough to rendering a couple of pages.

So you don’t need to worry about breaking the XOD file into parts, because we can send HTTP requests (with the Range header) to specifically fetch parts.

See the following discussion for more information:!topic/pdfnet-webviewer/RbV9ehJ2LwY

In case you are concerned about time required to process entire document, WebViewer also supports on-the-fly conversion or streaming. This means that you don’t need to wait for the whole file to convert before viewing the file. WebViewer will display pages as they arrive. This is shown in WebViewerStreaming sample that is included as part of PDFNet SDK. While document is streamed (or converted) for the first time, it is a good idea to cache the resulting XOD file so that subsequent viewing request would not require additional server intervention and the viewer can also take advantage of random page access (without need to download the entire file).