Jump to content

PDF.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dbeef (talk | contribs) at 01:05, 24 May 2022 (Wikidata latest release version). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

PDF.js
Original author(s)Andreas Gal
Developer(s)Mozilla
Initial release2 July 2011 (2011-07-02)[1]
Stable release
5.3.31[2] Edit this on Wikidata / June 1, 2025; 19 days ago (June 1, 2025)
Repository
Written inJavaScript, CSS, HTML
PlatformJavaScript engine, web browser
Size3.94 MB[1]
TypePDF viewer
LicenseApache License 2.0[3]
Websitemozilla.github.io/pdf.js/

PDF.js or 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 can work as a part of a website or of a browser. Originally created as a Firefox extension,[4] it is included in Firefox since 2012 (version 15)[5][6] and is enabled by default since 2013 (version 19).[7][8] It is also included in Thunderbird,[9] ownCloud,[10] Nextcloud,[11][12] and as a browser extension for Google Chrome, Chromium,[13] Firefox for Android,[14] Pale Moon[15][16] and SeaMonkey.[16][17]

Developers will also embed PDF.js in their software to enable PDF rendering and viewing in a web or native application or rendering on a server. Examples of PDF.js integrations include Dropbox (service) for PDF document previews,[18] Slack (software),[19] and Linkedin for viewing accessible course materials online.[20] Some software development products are also making it easier to extend PDF.js.[21][22]

Behavior

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

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

PDF features not yet added to PDF.js or incomplete:

  • Optional Content Groups (OCGs)
  • ICC Color Profiles
  • Spot colors
  • Overprint simulation
  • Transparency groups (knockout/isolation)
  • Some patterns & shadings
  • 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.[26] Performance and reliability will be the best on Chrome and Firefox, which are fully supported and subject to automated testing.

See also

References

  1. ^ a b "Releases · mozilla/pdf.js". GitHub. Retrieved 12 March 2021.
  2. ^ "Release 5.3.31". 1 June 2025. Retrieved 16 June 2025.
  3. ^ "pdf.js/LICENSE at master · mozilla/pdf.js". GitHub. 17 February 2022.
  4. ^ "PDF Viewer(discontinued)". addons.mozilla.org. Archived from the original on 5 December 2015. Retrieved 2 December 2015.
  5. ^ Parfeni, Lucian (30 April 2012). "PDF.JS and Download Manager Panel Pushed to Firefox 15". Softpedia. SoftNews.
  6. ^ Blagoveschenskiy, Anton (29 August 2012). "Вышла новая версия браузера Firefox 15" [New version 15 of the Firefox browser released]. Rossiyskaya Gazeta (in Russian). Retrieved 9 September 2012.
  7. ^ "Bug 773397 – Disable pdf.js prior to FF15 beta 5". bugzilla.mozilla.org.
  8. ^ "Firefox 19.0 Release Notes". mozilla.org. Retrieved 30 April 2013.
  9. ^ "810815 - Integrate pdf.js to Thunderbird". bugzilla.mozilla.org. Retrieved 28 January 2022.
  10. ^ owncloud/files_pdfviewer, ownCloud, 8 February 2020, retrieved 28 March 2020
  11. ^ nextcloud/files_pdfviewer, Nextcloud, 18 March 2020, retrieved 28 March 2020
  12. ^ "PDF viewer - Apps - App Store - Nextcloud". apps.nextcloud.com. Retrieved 28 March 2020.
  13. ^ "PDF Viewer". Chrome Web Store.
  14. ^ "Android PDF.js". addons.mozilla.org.
  15. ^ "Add-ons - Moon PDF Viewer". Pale Moon - Add-ons. Archived from the original on 3 January 2020. Retrieved 4 May 2021.
  16. ^ a b "IsaacSchemm/pdf.js-seamonkey: SeaMonkey fork of pdf.js". GitHub. Archived from the original on 6 December 2020. Retrieved 4 May 2021.
  17. ^ "PDF Viewer for SeaMonkey". Add-ons for SeaMonkey.
  18. ^ Lauraharrisneal. "Annotations on Document Previews". dropbox.tech. Retrieved 5 August 2021.
  19. ^ "What matters to you, matters to us. - Slack Engineering". Slack Engineering. 16 November 2016. Retrieved 5 August 2021.
  20. ^ "Under the hood: Learning with documents". engineering.linkedin.com. Retrieved 5 August 2021.
  21. ^ "Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling | Hacker News". news.ycombinator.com. Retrieved 5 August 2021.
  22. ^ "Introducing PDF.js Express". pdfjs.express. Retrieved 5 August 2021.
  23. ^ "How fast is PDF.js? – Mozilla Hacks - the Web developer blog".
  24. ^ "1706133 - (pdf-xfa) [meta] XFA support". bugzilla.mozilla.org. Retrieved 28 January 2022.
  25. ^ "Guide to Evaluating PDF.js Rendering". PDFTron. Retrieved 5 August 2021.
  26. ^ "Frequently Asked Questions · mozilla/pdf.js Wiki". GitHub. Retrieved 5 August 2021.