mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-11-30 16:37:18 +01:00
Replace bundled font programs with glyph data. Generate replacement fonts with PDF widths and substitutes for missing XFA fonts. Use a JavaScript fallback when WASM is disabled or fails to load.
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
Run the example to convert the first page of a PDF file to a PNG image:
$ cd examples/node/pdf2png
$ node pdf2png.mjs