Get Started

play_arrow

Learn more

play_arrow

Common use cases

play_arrow

Open a document

play_arrow

Save a document

play_arrow

Viewer

play_arrow

UI Customization

play_arrow

Annotations

play_arrow

Collaboration

play_arrow

Forms

play_arrow

Signature

play_arrow

Measurement

play_arrow

PDF.js Express REST API

play_arrow

Open a document from URL

If you have a URL for a document, you can pass it either as a constructor option or to loadDocument to open it.

// Passing a URL into the Web Viewer constructor
WebViewer({
  ...,
  initialDoc: 'https://myserver.com/myfile.pdf',
}, document.getElementById('viewer'));

// or

// Passing a URL into the loadDocument method
WebViewer(...)
  .then(function(instance) {
    instance.loadDocument('https://myserver.com/myfile.pdf', { filename: 'myfile.pdf' });
  });