PDF.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Serols (talk | contribs) at 14:23, 28 June 2020 (Reverted edits by 180.253.158.195 (talk) (HG) (3.4.9)). 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
2.3.200 / October 19, 2019; 4 years ago (2019-10-19)[1]
Repository
Written inJavaScript, CSS, HTML
PlatformJavaScript engine, web browser
Size3.94 MB[1]
TypePDF viewer
LicenseApache License 2.0[2]
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-compliance HTML5 Canvas. The project is led by the Mozilla Foundation 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,[3] it is now included in Mozilla Firefox since 2012 (version 15)[4][5] and is enabled by default since 2013 (version 19).[6][7] It is also included in ownCloud[8], Nextcloud[9][10], and as a browser extension for Google Chrome, Chromium,[11] Firefox for Android,[12] Pale Moon[13] and SeaMonkey.[14]

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

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. [20] Another analysis found that between 1-3% of PDFs in certain document subsets would crash or freeze the PDF.js viewer, either due to a corrupted file or a complex file.[21]

PDF.js supports most of the PDF specification, but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.[22]

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
  • Interactive and fillable forms

The PDF.js contributor community also notes that the browser behavior of PDF.js varies with browser support for PDF.js’s required features.[23] 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 c "Releases · mozilla/pdf.js". GitHub.
  2. ^ "pdf.js/LICENSE at master · mozilla/pdf.js". GitHub.
  3. ^ "PDF Viewer(discontinued)". addons.mozilla.org. Archived from the original on 5 December 2015. Retrieved 2 December 2015.
  4. ^ Parfeni, Lucian (30 April 2012). "PDF.JS and Download Manager Panel Pushed to Firefox 15". Softpedia. SoftNews.
  5. ^ Blagoveschenskiy, Anton (29 August 2012). "Вышла новая версия браузера Firefox 15" [New version 15 of the Firefox browser released]. Rossiyskaya Gazeta (in Russian). Retrieved 9 September 2012.
  6. ^ "Bug 773397 – Disable pdf.js prior to FF15 beta 5". bugzilla.mozilla.org.
  7. ^ "Firefox 19.0 Release Notes". mozilla.org. Retrieved 30 April 2013.
  8. ^ owncloud/files_pdfviewer, ownCloud, 8 February 2020, retrieved 28 March 2020
  9. ^ nextcloud/files_pdfviewer, Nextcloud, 18 March 2020, retrieved 28 March 2020
  10. ^ "PDF viewer - Apps - App Store - Nextcloud". apps.nextcloud.com. Retrieved 28 March 2020.
  11. ^ "PDF Viewer". Chrome Web Store.
  12. ^ "Android PDF.js". addons.mozilla.org.
  13. ^ "Add-ons - Moon PDF Viewer". Pale Moon - Add-ons.
  14. ^ "PDF Viewer for SeaMonkey". Add-ons for SeaMonkey.
  15. ^ https://dropbox.tech/application/annotations-on-document-previews
  16. ^ https://slack.engineering/what-matters-to-you-matters-to-us-10ff49650a5d
  17. ^ https://engineering.linkedin.com/blog/2019/04/under-the-hood--learning-with-documents
  18. ^ https://news.ycombinator.com/item?id=22763656
  19. ^ https://pdfjs.express/blog/introducing-pdfjs-express
  20. ^ https://hacks.mozilla.org/2014/05/how-fast-is-pdf-js/
  21. ^ https://www.pdftron.com/blog/pdf-js/pdf-js-reliability-benchmark/
  22. ^ https://www.pdftron.com/blog/pdf-js/guide-to-pdf-js-rendering/
  23. ^ https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#which-browsers-are-supported ]

External links