🌐
Mozilla
mozilla.github.io β€Ί pdf.js
PDF.js - Home
A general-purpose, web standards-based platform for parsing and rendering PDFs.
Nunjucks
Grab nunjucks.js (min) for the full library, or grab nunjucks-slim.js (min) for a slim version that only works with precompiled templates.
API
A general-purpose, web standards-based platform for parsing and rendering PDFs.
Examples
This tutorial shows how PDF.js can be used as a library in a web browser.
Getting started
A general-purpose, web standards-based platform for parsing and rendering PDFs.

PDF viewer in JavaScript included in Mozilla Firefox

PDF.js is a JavaScript library that renders Portable Document Format (PDF) files using the web standards-compliant HTML5 Canvas. The project is led by the Mozilla Corporation after Andreas Gal launched it (initially … Wikipedia
Factsheet
Original author Andreas Gal
Developer Mozilla
Initial release 2 July 2011 (2011-07-02)
Factsheet
Original author Andreas Gal
Developer Mozilla
Initial release 2 July 2011 (2011-07-02)
🌐
npm
npmjs.com β€Ί package β€Ί pdfjs-dist
pdfjs-dist - npm
PDF.js is a Portable Document Format (PDF) library that is built with HTML5.
      Β» npm install pdfjs-dist
    
Published Β  Nov 29, 2025
Version Β  5.4.449
🌐
GitHub
github.com β€Ί mozilla β€Ί pdf.js
GitHub - mozilla/pdf.js: PDF Reader in JavaScript
PDF Reader in JavaScript. Contribute to mozilla/pdf.js development by creating an account on GitHub.
Starred by 52.4K users
Forked by 10.5K users
Languages Β  JavaScript 71.3% | Fluent 25.5% | CSS 2.2%
🌐
Mozilla
mozilla.github.io β€Ί pdf.js β€Ί getting_started
PDF.js - Getting Started
β”œβ”€β”€ docs/ - website source code β”œβ”€β”€ examples/ - simple usage examples β”œβ”€β”€ extensions/ - browser extension source code β”œβ”€β”€ external/ - third party code β”œβ”€β”€ l10n/ - translation files β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ core/ - core layer β”‚ β”œβ”€β”€ display/ - display layer β”‚ β”œβ”€β”€ shared/ - shared code between the core and display layers β”‚ β”œβ”€β”€ interfaces.js - interface definitions for the core/display layers β”‚ └── pdf.*.js - wrapper files for bundling β”œβ”€β”€ test/ - unit, font, reference, and integration tests β”œβ”€β”€ web/ - viewer layer β”œβ”€β”€ LICENSE β”œβ”€β”€ README.md β”œβ”€β”€ gulpfile.mjs - build scripts/logic β”œβ”€β”€ package-lock.json - pinned dependency versions └── package.json - package definition and dependencies
🌐
Wikipedia
en.wikipedia.org β€Ί wiki β€Ί PDF.js
PDF.js - Wikipedia
July 18, 2025 - PDF.js is a JavaScript library that renders Portable Document Format (PDF) files using the web standards-compliant HTML5 Canvas.
🌐
Nutrient
nutrient.io β€Ί blog β€Ί sdk β€Ί complete guide to pdfjs
Complete guide to PDF.js
August 11, 2025 - PDF.js is Mozilla’s open source JavaScript library for rendering PDFs in browsers without plugins. This guide covers PDF.js setup, rendering with the Canvas API, navigation controls, zoom functionality, and handling basic annotations. However, for enterprise applications requiring advanced features, high performance, and dedicated support, Nutrient Web SDK is the ideal solution.
🌐
DEV Community
dev.to β€Ί handdot β€Ί generate-a-pdf-in-js-summary-and-comparison-of-libraries-3k0p
A full comparison of 6 JS libraries for generating PDFs - DEV Community
March 22, 2022 - As for PDFKit the APIs provided have an imperative pattern, with the result that creating a complex layout tend to be very hard. Embedding fonts it’s not difficult but needs an extra step: converting the fonts to TTF files. jsPDF is not the easiest library to master, but the documentation is very rich so you’ll not encounter any particular obstacle while working with it.
Find elsewhere
🌐
cdnjs
cdnjs.com β€Ί home β€Ί libraries β€Ί pdf.js
pdf.js - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers
Libraries Β· pdf.js Β· PDF Reader in JavaScript Β· 52k Β· GitHub Β· package Β· Apache-2.0 licensed Β· Tags: PDF, reader, Js Β· Version Β· 5.4.149 Β· Loading... Asset Type Β· All Β· Loading...
🌐
Apache PDFBox
products.documentprocessing.com β€Ί viewer β€Ί javascript β€Ί pdf.js
PDF.js | Advanced JavaScript PDF Viewer | Open Source
June 25, 2025 - PDF.js is free and open source JavaScrpit PDF viewer library with a strong community. It provides cross-browser support for both modern and legacy browsers. Yes, user experience on legacy browsers may not be same as the modern ones but it's ...
🌐
npm
npmjs.com β€Ί package β€Ί pdfjs-lib
pdfjs-lib - npm
PDF.js is a Portable Document Format (PDF) library that is built with HTML5.
      Β» npm install pdfjs-lib
    
Published Β  Jan 12, 2023
Version Β  0.0.149
🌐
GitHub
github.com β€Ί parallax β€Ί jsPDF
GitHub - parallax/jsPDF: Client-side JavaScript PDF generation for everyone.
A library to generate PDFs in JavaScript. You can catch me on twitter: @MrRio or head over to my company's website for consultancy. jsPDF is now co-maintained by yWorks - the diagramming experts.
Starred by 30.9K users
Forked by 4.8K users
Languages Β  JavaScript 96.4% | TypeScript 2.4% | HTML 1.2%
🌐
PDF.js Express
pdfjs.express
PDF.js Viewer: Annotate, Form Fill | Easy Setup | PDF.js Express
Form Filling Library Β· Real-time Collaboration Β· Customize your PDF.js Viewer
🌐
SourceForge
sourceforge.net β€Ί projects β€Ί pdf-js.mirror
PDF.js download | SourceForge.net
A PDF Reader in JavaScript. PDF.js is a web standards-based platform for parsing and rendering Portable Document Formats (PDFs). Open source and built with HTML5, this PDF viewer is supported by a great community and Mozilla Labs.
🌐
Mozilla
mozilla.github.io β€Ί pdf.js β€Ί examples
PDF.js - Examples
This tutorial shows how PDF.js can be used as a library in a web browser.
🌐
Nutrient
nutrient.io β€Ί blog β€Ί sdk β€Ί top js pdf libraries
Top JavaScript PDF generator libraries for 2025
June 24, 2025 - PDFKit(opens in a new tab) is a popular and robust Node.js JavaScript PDF generator library. It lets you create multipage PDFs from scratch β€” adding text, images, shapes, and custom fonts.
🌐
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
🌐
PDFKit
pdfkit.org
PDFKit
A JavaScript PDF generation library for Node and the browser.
🌐
GitHub
github.com β€Ί mozilla β€Ί pdfjs-dist
GitHub - mozilla/pdfjs-dist: Generic build of PDF.js library.
PDF.js is a Portable Document Format (PDF) library that is built with HTML5.
Starred by 1.3K users
Forked by 568 users
Languages Β  JavaScript 99.2% | CSS 0.8%
🌐
npm
npmjs.com β€Ί package β€Ί jspdf
jspdf - npm
A library to generate PDFs in JavaScript. You can catch me on twitter: @MrRio or head over to my company's website for consultancy. jsPDF is now co-maintained by yWorks - the diagramming experts.
      Β» npm install jspdf
    
Published Β  Nov 19, 2025
Version Β  3.0.4