PDF.js

PDF viewer in JavaScript included in Mozilla Firefox


title: "PDF.js" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["cross-platform-free-software", "firefox", "free-pdf-readers", "free-web-software", "javascript-libraries", "firefox-extensions-merged-to-firefox"] description: "PDF viewer in JavaScript included in Mozilla Firefox" topic_path: "technology/web" source: "https://en.wikipedia.org/wiki/PDF.js" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary PDF viewer in JavaScript included in Mozilla Firefox ::

::data[format=table title="Infobox software"]

FieldValue
namePDF.js
logoPdf-js logo.svg
screenshotPDF js Screenshot in Firefox 100.png
captionPDF.js in Firefox 100, with a table of contents displayed on the sidebar
authorAndreas Gal
developerMozilla
released
latest release version
latest release date
programming languageJavaScript, CSS, HTML
size3.94 MB
platformJavaScript engine, web browser
genrePDF viewer
licenseApache License 2.0
website
::

| name = PDF.js | logo = Pdf-js logo.svg | screenshot = PDF js Screenshot in Firefox 100.png | caption = PDF.js in Firefox 100, with a table of contents displayed on the sidebar | collapsible = | author = Andreas Gal | developer = Mozilla | released = | latest release version = | latest release date = | programming language = JavaScript, CSS, HTML | size = 3.94 MB | platform = JavaScript engine, web browser | genre = PDF viewer | license = Apache License 2.0 | website =

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 as an experiment) in 2011.

History and application

PDF.js was originally created as an extension for Firefox and is included in Firefox since 2012 (version 15), and enabled by default since 2013 (version 19). It was added to Firefox for Android in 2023 (version 111).

The project was created to provide a way for viewing PDF documents natively in the web browser, which prevents potential security risks when opening PDF documents outside a browser, as the code for displaying the document is sandboxed in a browser. Its implementation uses the Canvas element from HTML5, which allows for fast rendering speeds.

PDF.js is also used in Thunderbird, ownCloud, Nextcloud, and is available as a browser extension for Google Chrome/Chromium, Pale Moon and SeaMonkey.

It can be integrated or embedded in a web or native application to enable PDF rendering and viewing, and allows advanced usages such as Server-side rendering.

Many web applications, including Dropbox, Slack, and LinkedIn Learning integrate PDF.js to enable previewing PDF documents.

Behavior

According to a benchmark by Mozilla, PDF.js is performant for viewing most common PDF files, while it may have some issues with large or 'graphics-heavy' documents.

PDF.js supports most of the PDF specifications (including form support or XFA), but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.

Several PDF/X or optional PDF features that are not supported in PDF.js include:

  • ICC Color Profiles
  • Spot colors
  • Overprint simulation
  • Transparency groups (knockout/isolation)
  • High-fidelity printing

The PDF.js contributor community also notes that the browser behavior of PDF.js varies with browser support for PDF.js's required features. Performance and reliability will be the best on Chrome and Firefox, which are fully supported and subject to automated testing.

References

References

  1. "Releases · mozilla/pdf.js".
  2. (17 February 2022). "pdf.js/LICENSE at master · mozilla/pdf.js".
  3. "PDF Viewer(discontinued)".
  4. Parfeni, Lucian. (2012-04-30). "PDF.JS and Download Manager Panel Pushed to Firefox 15". SoftNews.
  5. Blagoveschenskiy, Anton. (2012-08-29). "Вышла новая версия браузера Firefox 15". [[Rossiyskaya Gazeta]].
  6. "Bug 773397 – Disable pdf.js prior to FF15 beta 5".
  7. "Firefox 19.0 Release Notes".
  8. "Firefox for Android 111.0, See All New Features, Updates and Fixes".
  9. Shankland, Stephen. (2011-06-24). "Mozilla eyes hassle-free PDFs on the Web".
  10. "810815 - Integrate pdf.js to Thunderbird".
  11. (2020-02-08). "owncloud/files_pdfviewer". ownCloud.
  12. (2020-03-18). "nextcloud/files_pdfviewer". Nextcloud.
  13. "PDF viewer - Apps - App Store - Nextcloud".
  14. "PDF Viewer".
  15. "Add-ons - Moon PDF Viewer".
  16. "IsaacSchemm/pdf.js-seamonkey: SeaMonkey fork of pdf.js".
  17. (25 April 2020). "PDF Viewer for SeaMonkey".
  18. Lauraharrisneal. "Annotations on Document Previews".
  19. (2016-11-16). "What matters to you, matters to us. - Slack Engineering". Slack Engineering.
  20. "Under the hood: Learning with documents".
  21. "How fast is PDF.js? – Mozilla Hacks - the Web developer blog".
  22. "1706133 - (pdf-xfa) [meta] XFA support".
  23. "Guide to Evaluating PDF.js Rendering".
  24. "ICC profiles support for images · Issue #2856 · mozilla/pdf.js".
  25. "Overprint Support · Issue #7360 · mozilla/pdf.js".
  26. "Issue about knockout groups. · Issue #3136 · mozilla/pdf.js".
  27. "Frequently Asked Questions · mozilla/pdf.js Wiki".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

cross-platform-free-softwarefirefoxfree-pdf-readersfree-web-softwarejavascript-librariesfirefox-extensions-merged-to-firefox