pdf.js/examples/node/pdf2png
Jonas Jenwald c5f73edcd2 Convert the DOMCanvasFactory to an ES6 class
For consistency, also updates the `pdf2png.js` example to use the slightly less verbose `canvasAndContext` parameter name.
2017-05-11 20:15:22 +02:00
..
pdf2png.js Convert the DOMCanvasFactory to an ES6 class 2017-05-11 20:15:22 +02:00
README.md Example for converting PDF to PNG using the Node canvas library 2017-03-26 20:24:00 +02:00

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 project:

$ npm install
$ gulp dist

Install the Node canvas library to convert the first page of a PDF file to a PNG image:

$ npm install canvas
$ cd examples/node/pdf2png
$ node pdf2png.js