0ecc22cb04
This should provide a better out-of-the-box experience when using PDF.js in a Node.js environment, since it's missing native support for both `@font-face` and `Image`. Please note that this change *only* affects the default values, hence it's still possible for an API consumer to override those values when calling `getDocument`. Also, prevents "ReferenceError: document is not defined" errors, when running the unit-tests in Node.js/Travis. |
||
---|---|---|
.. | ||
pdf2png.js | ||
README.md |
Overview
Example to demonstrate converting a PDF file to a PNG image using the PDF.js library.
Getting started
Install the dependencies and build the PDF.js library:
$ npm install
$ gulp dist-install
Install the Node canvas library and run the example to convert the first page of a PDF file to a PNG image:
$ npm install canvas
$ cd examples/node/pdf2png
$ node pdf2png.js