PDF.js explained
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[3] and is included in Firefox since 2012 (version 15),[4] [5] and enabled by default since 2013 (version 19).[6] [7] It was added to Firefox for Android in 2023 (version 111).[8]
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.[9] Its implementation uses the Canvas element from HTML5, which allows for fast rendering speeds.
PDF.js is also used in Thunderbird,[10] ownCloud, Nextcloud,[11] and is available as a browser extension for Google Chrome/Chromium,[12] Pale Moon[13] [14] and SeaMonkey.[15]
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,[16] Slack,[17] and LinkedIn Learning[18] 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.[19]
PDF.js supports most of the PDF specifications (including form support or XFA[20]), but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.[21]
Several PDF/X or optional PDF features that are not supported in PDF.js include:
The PDF.js contributor community also notes that the browser behavior of PDF.js varies with browser support for PDF.js's required features.[25] Performance and reliability will be the best on Chrome and Firefox, which are fully supported and subject to automated testing.
See also
External links
Notes and References
- Web site: Releases · mozilla/pdf.js . 12 March 2021 . GitHub.
- Web site: pdf.js/LICENSE at master · mozilla/pdf.js . GitHub. 17 February 2022 .
- Web site: PDF Viewer(discontinued) . addons.mozilla.org . 2015-12-02 . https://web.archive.org/web/20151205121858/https://addons.mozilla.org/en-US/firefox/addon/pdfjs/. 5 December 2015.
- Web site: PDF.JS and Download Manager Panel Pushed to Firefox 15 . Lucian . Parfeni . . SoftNews . 2012-04-30.
- Web site: Вышла новая версия браузера Firefox 15 . Anton . Blagoveschenskiy . . 2012-08-29 . 2012-09-09 . ru . New version 15 of the Firefox browser released .
- Web site: Bug 773397 – Disable pdf.js prior to FF15 beta 5. bugzilla.mozilla.org.
- Web site: Firefox 19.0 Release Notes. 30 April 2013. mozilla.org.
- Web site: Firefox for Android 111.0, See All New Features, Updates and Fixes . www.mozilla.org . 19 April 2024.
- Web site: Shankland . Stephen . 2011-06-24 . Mozilla eyes hassle-free PDFs on the Web . 2022-05-24 . CNET . en.
- Web site: 810815 - Integrate pdf.js to Thunderbird. 2022-01-28. bugzilla.mozilla.org. en.
- Web site: PDF viewer - Apps - App Store - Nextcloud. apps.nextcloud.com. 2020-03-28.
- Web site: PDF Viewer. Chrome Web Store.
- Web site: Add-ons - Moon PDF Viewer. https://web.archive.org/web/20200103222159/https://addons.palemoon.org/addon/moon-pdf-viewer/. January 3, 2020. May 4, 2021. Pale Moon - Add-ons.
- Web site: IsaacSchemm/pdf.js-seamonkey: SeaMonkey fork of pdf.js. live. https://web.archive.org/web/20201206160734/https://github.com/IsaacSchemm/pdf.js-seamonkey. December 6, 2020. May 4, 2021. GitHub.
- Web site: PDF Viewer for SeaMonkey. Add-ons for SeaMonkey. 25 April 2020 .
- Web site: Lauraharrisneal. Annotations on Document Previews. 2021-08-05. dropbox.tech. en.
- News: 2016-11-16. What matters to you, matters to us. - Slack Engineering. en-US. Slack Engineering. 2021-08-05.
- Web site: Under the hood: Learning with documents. 2021-08-05. engineering.linkedin.com. en.
- Web site: How fast is PDF.js? – Mozilla Hacks - the Web developer blog.
- Web site: 1706133 - (pdf-xfa) [meta] XFA support]. 2022-01-28. bugzilla.mozilla.org. en.
- Web site: Guide to Evaluating PDF.js Rendering. 2021-08-05. PDFTron.
- Web site: ICC profiles support for images · Issue #2856 · mozilla/pdf.js . 2022-05-24 . GitHub . en.
- Web site: Overprint Support · Issue #7360 · mozilla/pdf.js . 2022-05-24 . GitHub . en.
- Web site: Issue about knockout groups. · Issue #3136 · mozilla/pdf.js . 2022-05-24 . GitHub . en.
- Web site: Frequently Asked Questions · mozilla/pdf.js Wiki. 2021-08-05. GitHub. en.