PDF.js
| PDF.js | |
|---|---|
| File:Pdf-js logo.svg | |
| File:PDF js Screenshot in Firefox 100.png PDF.js in Firefox 100, with a table of contents displayed on the sidebar | |
| Original author | Andreas Gal |
| Developer | Mozilla |
| Initial release | 2 July 2011[1] |
| Repository |
|
| Written in | JavaScript, CSS, HTML |
| Engine | |
| Platform | JavaScript engine, web browser |
| Size | 3.94 MB[1] |
| Type | PDF viewer |
| License | Apache License 2.0[2] |
| Website | mozilla |
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
[edit | edit source]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.[9]
PDF.js is also used in Thunderbird,[10] ownCloud,[11] Nextcloud,[12][13] and is available as a browser extension for Google Chrome/Chromium,[14] Pale Moon[15][16] and SeaMonkey.[16][17]
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,[18] Slack,[19] and LinkedIn Learning[20] integrate PDF.js to enable previewing PDF documents.
Behavior
[edit | edit source]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.[21]
PDF.js supports most of the PDF specifications (including form support or XFA[22]), but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.[23]
Several PDF/X or optional PDF features that are not supported in PDF.js include:
- ICC Color Profiles[24]
- Spot colors
- Overprint simulation[25]
- Transparency groups (knockout/isolation)[26]
- 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.[27] Performance and reliability will be the best on Chrome and Firefox, which are fully supported and subject to automated testing.
See also
[edit | edit source]Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').
References
[edit | edit source]- ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
External links
[edit | edit source]- Lua error in Module:Official_website at line 94: attempt to index field 'wikibase' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).