npm
npmjs.com › package › pdfjs-dist
pdfjs-dist - npm
Generic build of Mozilla's PDF.js library.. Latest version: 5.4.449, last published: 12 days ago. Start using pdfjs-dist in your project by running `npm i pdfjs-dist`. There are 2279 other projects in the npm registry using pdfjs-dist.
» npm install pdfjs-dist
Published Nov 29, 2025
Version 5.4.449
Repository https://github.com/mozilla/pdf.js
Homepage https://mozilla.github.io/pdf.js/
npm
npmjs.com › package › pdfjs
pdfjs - npm
A Portable Document Format (PDF) generation library targeting both the server- and client-side.. Latest version: 2.5.4, last published: 5 months ago. Start using pdfjs in your project by running `npm i pdfjs`. There are 53 other projects in ...
» npm install pdfjs
Published Jul 01, 2025
Version 2.5.4
Author Markus Ast
Repository https://github.com/rkusa/pdfjs
Homepage https://github.com/rkusa/pdfjs
Mozilla
mozilla.github.io › pdf.js
PDF.js - Home
A general-purpose, web standards-based platform for parsing and rendering PDFs.
npm
npmjs.com › package › react-pdf
react-pdf - npm
To use the latest version of React-PDF, your project needs to use React 16.8 or later. React-PDF may be used with Preact. Add React-PDF to your project by executing npm install react-pdf or yarn add react-pdf.
» npm install react-pdf
Published Oct 09, 2025
Version 10.2.0
Author Wojciech Maj
Repository https://github.com/wojtekmaj/react-pdf
npm
npmjs.com › package › jspdf
jspdf - npm
PDF Document creation from JavaScript. Latest version: 3.0.4, last published: 17 days ago. Start using jspdf in your project by running `npm i jspdf`. There are 2036 other projects in the npm registry using jspdf.
» npm install jspdf
Published Nov 19, 2025
Version 3.0.4
Repository https://github.com/parallax/jsPDF
Homepage https://github.com/parallax/jsPDF
npm
npmjs.com › package › pdf.js
pdf.js - npm
A PDF generation library for Node.js. Latest version: 0.1.0, last published: 14 years ago. Start using pdf.js in your project by running `npm i pdf.js`. There are 8 other projects in the npm registry using pdf.js.
» npm install pdf.js
Published Nov 12, 2011
Version 0.1.0
Author Stanislav Feldman
Repository https://github.com/stanislavfeldman/pdf.js
Top answer 1 of 7
10
Maybe you can use require function.
Add @types/node packages, and write require('pdfjs-dist') at the top of the your source code.
So, you can modify your code like below.
Now, this code will work.
import { PDFJSStatic } from 'pdfjs-dist';
const PDFJS: PDFJSStatic = require('pdfjs-dist');
PDFJS.getDocument('helloworld.pdf').then(console.log);
I think that @types/pdfjs-dist has problems in its implementation.
2 of 7
6
With @types/pdfjs-dist 2.1.0 and pdfjs-dist "2.1.266", the fundamental issue still doesn't quite seem fixed, but I've found that the approach from their own test works:
import { getDocument, PDFDocumentProxy, PDFPromise, Util } from 'pdfjs-dist';
(It's not pretty, though, as it pollutes your namespace.)
npm
npmjs.com › package › pdfjs-lib
pdfjs-lib - npm
Generic build of Mozilla's PDF.js library.. Latest version: 0.0.149, last published: 3 years ago. Start using pdfjs-lib in your project by running `npm i pdfjs-lib`. There are no other projects in the npm registry using pdfjs-lib.
» npm install pdfjs-lib
Published Jan 12, 2023
Version 0.0.149
Repository https://github.com/mozilla/pdfjs-dist
Homepage http://mozilla.github.io/pdf.js/
npm
npmjs.com › search
pdfjs - npm search
An angular component for displaying pdfs, wrapping the latest Mozilla PDF.js.
GitHub
github.com › mozilla › pdf.js
GitHub - mozilla/pdf.js: PDF Reader in JavaScript
To use PDF.js in a web application you can choose to use a pre-built version of the library or to build it from source. We supply pre-built versions for usage with NPM under the pdfjs-dist name.
Starred by 52.4K users
Forked by 10.5K users
Languages JavaScript 71.3% | Fluent 25.5% | CSS 2.2%
PDF.js Express
pdfjs.express › documentation › get-started › npm
Integrating PDF.js Express Plus with NPM | Documentation
{ "scripts": { "move-static": "cp -a ./node_modules/@pdftron/pdfjs-express/public/. ./dist/public/pdfjsexpress", "build": "mybuildscript && npm run move-static" } } This will copy all required files into the dist/public folder after your build is complete. ... If you're using webpack to bundle your project, you can use copy-webpack-plugin to copy files for you automatically. ... module.exports = { ...otherConfig, plugins: [ new CopyPlugin([{ from: './node_modules/@pdftron/pdfjs-express/public', to: './dist/public/pdfjsexpress' }] ), ], };
npm
npmjs.com › package › pdf.js-extract
pdf.js-extract - npm
super-simple async PDF reader that extracts text with x,y page positions based on pdf.js. Latest version: 0.2.1, last published: 3 years ago. Start using pdf.js-extract in your project by running `npm i pdf.js-extract`. There are 32 other projects ...
» npm install pdf.js-extract
Mozilla
mozilla.github.io › pdf.js › examples
PDF.js - Examples
PDF.js heavily relies on the use of Promises.
GitHub
github.com › mozilla › pdf.js › wiki › Setup-pdf.js-in-a-website
Setup PDF.js in a website
Install the PDF.js dependency in your project: npm install pdfjs-dist --save · You can find a usage example at https://github.com/mozilla/pdf.js/blob/master/examples/node/getinfo.mjs.
Author mozilla
npm
npmjs.com › package › pdf-lib
pdf-lib - npm
Create and modify PDF files with JavaScript. Latest version: 1.17.1, last published: 4 years ago. Start using pdf-lib in your project by running `npm i pdf-lib`. There are 1017 other projects in the npm registry using pdf-lib.
» npm install pdf-lib
Published Nov 06, 2021
Version 1.17.1
Author Andrew Dillon
Repository https://github.com/Hopding/pdf-lib
Homepage https://pdf-lib.js.org/
Mozilla
mozilla.github.io › pdf.js › getting_started
PDF.js - Getting Started
PDF.js is hosted on several free CDNs: https://www.jsdelivr.com/package/npm/pdfjs-dist · https://cdnjs.com/libraries/pdf.js · https://unpkg.com/pdfjs-dist/ Note that we only mention the most relevant files and folders.
npm
npmjs.com › package › react-pdf-js
react-pdf-js - npm
Latest version: 5.1.0, last published: 6 years ago. Start using react-pdf-js in your project by running `npm i react-pdf-js`. There are 31 other projects in the npm registry using react-pdf-js.
» npm install react-pdf-js
Published Jun 19, 2019
Version 5.1.0
Author mikecousins
Repository https://github.com/mikecousins/react-pdf-js
Npm
npm.io › package › pdfjs
Pdfjs NPM | npm.io
A Portable Document Format (PDF) generation library targeting both the server- and client-side.