Some test text!

menu
Stream PDFkeyboard_arrow_down

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 PDFTron 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.

linkDisabling 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 the following page operations: doc.insertPages or doc.insertBlankPages.

You can disable downloader as follows:

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

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

Join our live demo to learn about use cases & capabilities for WebViewer

Learn more
close