PDF.js was originally created as an extension for Firefox[4] and is included in Firefox since 2012 (version 15),[5][6] and enabled by default since 2013 (version 19).[7][8] It was added to Firefox for Android in 2023 (version 111).[9]
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.[10] Its implementation uses the Canvas element from HTML5, which allows for fast rendering speeds.[10]
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.
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.[22]
PDF.js supports most of the PDF specifications (including form support or XFA[23]), but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.[24]
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.[28] Performance and reliability will be the best on Chrome and Firefox, which are fully supported and subject to automated testing.
^ ab"Releases · mozilla/pdf.js". GitHub. Retrieved 12 March 2021.
^"Release 4.1.392". 11 April 2024. Retrieved 23 April 2024.
^"pdf.js/LICENSE at master · mozilla/pdf.js". GitHub. 17 February 2022.
^"PDF Viewer(discontinued)". addons.mozilla.org. Archived from the original on 5 December 2015. Retrieved 2 December 2015.
^Parfeni, Lucian (30 April 2012). "PDF.JS and Download Manager Panel Pushed to Firefox 15". Softpedia. SoftNews.
^Blagoveschenskiy, Anton (29 August 2012). "Вышла новая версия браузера Firefox 15" [New version 15 of the Firefox browser released]. Rossiyskaya Gazeta (in Russian). Retrieved 9 September 2012.