Some test text!

Search
Hamburger Icon

Web / Guides / Stream PDF

Streaming PDF Documents using JavaScript

The useDownloader option is only applicable when loading PDF files. If you're loading XOD files then please go to Streaming XOD documents .

"Downloader" is a streaming feature of client only mode which allows it to efficiently fetch PDF files that have been linearized. The PDF spec describes linearization as a feature "that enables efficient incremental access of the file in a network environment."

By default downloader is enabled which allows WebViewer to quickly display the initial page in the document and download remaining pages incrementally for large linearized files.

Requirements for downloader to work
  • The PDF files are linearized. You can use a native Apryse library to linearize files.
  • Byte range requests supported on your server. This should usually just work when serving your documents statically but you may need to use a library if you're serving them in a different way.

Disabling downloader

Generally it is not recommended to disable downloader because of the improved performance when loading linearized documents. It is only advisable if your server doesn't support byte range requests and you aren't able to enable them for some reason.

You also need to disable it if you are using doc.insertBlankPages.

You can disable downloader as follows:

WebViewer({
  initialDoc: "GettingStarted.pdf",
  useDownloader: false
}, viewerElement);

Get the answers you need: Chat with us