Open a blob format document

Opening a document in WebViewer from Blob

If your document is already in Blob format you can pass the Blob object directly to loadDocument function.

1WebViewer(...)
2 .then(instance => {
3 // `myBlob` is your blob data which can come
4 // from sources such as a server or the filesystem
5 instance.UI.loadDocument(myBlob, { filename: 'myfile.pdf' });
6
7 const { documentViewer } = instance.Core;
8 documentViewer.addEventListener('documentLoaded', () => {
9 // perform document operations
10 });
11 });

If you are loading from a blob, please ensure the extension or filename options are set while loading.

Loading Options

WebViewer provides various options to load a document. Whether you are loading a document through the initialDoc option in the constructor or calling loadDocument after mounting, you can always provide options to load your document.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales