![]() Remember though that PDF.js uses promises, and the above will return a PDFDocumentLoadingTask instance that has a promise property which is resolved with the document object. To get the document: pdfjsLib.getDocument( 'helloworld.pdf') From the document, more information and individual pages can be fetched. At the top level there is a document object. The object structure of PDF.js loosely follows the structure of an actual PDF. This tutorial shows how PDF.js can be used as a library in a web browser.Įxamples/ provides more examples, including usage in Node.js (at examples/node/). If promises are new to you, it’s recommended you become familiar with them before continuing on. PDF.js heavily relies on the use of Promises.
0 Comments
Leave a Reply. |