pdf.js/examples/node/pdf2png
Jonas Jenwald 59c4041a49 Update the examples/-folder to account for outputting of JavaScript modules (PR 17055 follow-up)
This patch also changes most examples to use "top level await", since that's now supported and slightly simplifies the code.
2023-10-28 10:26:25 +02:00
..
pdf2png.mjs Update the examples/-folder to account for outputting of JavaScript modules (PR 17055 follow-up) 2023-10-28 10:26:25 +02:00
README.md Improve the instructions and code for the pdf2png example 2018-04-01 12:52:57 +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 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