Jump to content

PDF.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Sylvestre (talk | contribs)
refresh a bit the page
Line 27: Line 27:
== History and Application ==
== History and Application ==


PDF.js can work as a part of a website or of a browser. Originally created as a [[Firefox extension]],<ref name=":0">{{cite web|title = PDF Viewer(discontinued) |url = https://addons.mozilla.org/en-US/firefox/addon/pdfjs/|website = addons.mozilla.org |access-date = 2015-12-02 |url-status = dead |archive-url = https://web.archive.org/web/20151205121858/https://addons.mozilla.org/en-US/firefox/addon/pdfjs/|archive-date = 5 December 2015}}</ref> it is [[List_of_Firefox_extensions#Included_in_Firefox|included in Firefox]] since 2012 (version 15)<ref>{{cite web |title=PDF.JS and Download Manager Panel Pushed to Firefox 15 |first=Lucian |last=Parfeni |url=https://news.softpedia.com/news/PDF-JS-and-Download-Manager-Panel-Pushed-to-Firefox-15-267154.shtml |website=[[Softpedia]] |publisher=SoftNews |date=2012-04-30}}</ref><ref>{{cite web |title = Вышла новая версия браузера Firefox 15 | first = Anton | last = Blagoveschenskiy | url = https://www.rg.ru/2012/08/29/firefox-site-anons.html | newspaper = [[Rossiyskaya Gazeta]] | date = 2012-08-29 | access-date = 2012-09-09 | language = ru |trans-title = New version 15 of the Firefox browser released }}</ref> and is enabled by default since 2013 (version 19).<ref>{{cite web|url=https://bugzilla.mozilla.org/show_bug.cgi?id=773397|title=Bug 773397 – Disable pdf.js prior to FF15 beta 5|website=bugzilla.mozilla.org}}</ref><ref name="Firefox Notes - Desktop">{{cite web|title=Firefox 19.0 Release Notes|url=https://www.mozilla.org/en-US/firefox/19.0/releasenotes/|access-date=30 April 2013|website=mozilla.org}}</ref> It is also included in [[ownCloud]],<ref>{{Citation|title=owncloud/files_pdfviewer|date=2020-02-08|url=https://github.com/owncloud/files_pdfviewer|publisher=ownCloud|access-date=2020-03-28}}</ref> [[Nextcloud]],<ref>{{Citation|title=nextcloud/files_pdfviewer|date=2020-03-18|url=https://github.com/nextcloud/files_pdfviewer|publisher=Nextcloud|access-date=2020-03-28}}</ref><ref>{{Cite web|url=https://apps.nextcloud.com/apps/files_pdfviewer|title=PDF viewer - Apps - App Store - Nextcloud|website=apps.nextcloud.com|access-date=2020-03-28}}</ref> and as a browser extension for [[Google Chrome]], [[Chromium (web browser)|Chromium]],<ref>{{cite web|url=https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm|title=PDF Viewer|website=Chrome Web Store}}</ref> [[Firefox for Android]],<ref>{{cite web|title=Android PDF.js|url=https://addons.mozilla.org/android/addon/android-pdf-js|website=addons.mozilla.org}}</ref> [[Pale Moon (web browser)|Pale Moon]]<ref>{{cite web|title=Add-ons - Moon PDF Viewer|url=https://addons.palemoon.org/addon/moon-pdf-viewer|url-status=dead|archive-url=https://web.archive.org/web/20200103222159/https://addons.palemoon.org/addon/moon-pdf-viewer/|archive-date=January 3, 2020|access-date=May 4, 2021|website=Pale Moon - Add-ons}}</ref><ref name=":1">{{Cite web|title=IsaacSchemm/pdf.js-seamonkey: SeaMonkey fork of pdf.js|url=https://github.com/IsaacSchemm/pdf.js-seamonkey|url-status=live|archive-url=https://web.archive.org/web/20201206160734/https://github.com/IsaacSchemm/pdf.js-seamonkey|archive-date=December 6, 2020|access-date=May 4, 2021|website=[[GitHub]]}}</ref> and [[SeaMonkey]].<ref name=":1" /><ref>{{cite web|title=PDF Viewer for SeaMonkey|url=https://addons.thunderbird.net/seamonkey/addon/pdf-js-for-seamonkey|website=Add-ons for SeaMonkey}}</ref>
PDF.js can work as a part of a website or of a browser. Originally created as a [[Firefox extension]],<ref name=":0">{{cite web|title = PDF Viewer(discontinued) |url = https://addons.mozilla.org/en-US/firefox/addon/pdfjs/|website = addons.mozilla.org |access-date = 2015-12-02 |url-status = dead |archive-url = https://web.archive.org/web/20151205121858/https://addons.mozilla.org/en-US/firefox/addon/pdfjs/|archive-date = 5 December 2015}}</ref> it is [[List_of_Firefox_extensions#Included_in_Firefox|included in Firefox]] since 2012 (version 15)<ref>{{cite web |title=PDF.JS and Download Manager Panel Pushed to Firefox 15 |first=Lucian |last=Parfeni |url=https://news.softpedia.com/news/PDF-JS-and-Download-Manager-Panel-Pushed-to-Firefox-15-267154.shtml |website=[[Softpedia]] |publisher=SoftNews |date=2012-04-30}}</ref><ref>{{cite web |title = Вышла новая версия браузера Firefox 15 | first = Anton | last = Blagoveschenskiy | url = https://www.rg.ru/2012/08/29/firefox-site-anons.html | newspaper = [[Rossiyskaya Gazeta]] | date = 2012-08-29 | access-date = 2012-09-09 | language = ru |trans-title = New version 15 of the Firefox browser released }}</ref> and is enabled by default since 2013 (version 19).<ref>{{cite web|url=https://bugzilla.mozilla.org/show_bug.cgi?id=773397|title=Bug 773397 – Disable pdf.js prior to FF15 beta 5|website=bugzilla.mozilla.org}}</ref><ref name="Firefox Notes - Desktop">{{cite web|title=Firefox 19.0 Release Notes|url=https://www.mozilla.org/en-US/firefox/19.0/releasenotes/|access-date=30 April 2013|website=mozilla.org}}</ref> It is also included in [[Mozilla Thunderbird|Thunderbird]]<ref>{{Cite web|title=810815 - Integrate pdf.js to Thunderbird|url=https://bugzilla.mozilla.org/show_bug.cgi?id=810815|access-date=2022-01-28|website=bugzilla.mozilla.org|language=en}}</ref>, [[ownCloud]],<ref>{{Citation|title=owncloud/files_pdfviewer|date=2020-02-08|url=https://github.com/owncloud/files_pdfviewer|publisher=ownCloud|access-date=2020-03-28}}</ref> [[Nextcloud]],<ref>{{Citation|title=nextcloud/files_pdfviewer|date=2020-03-18|url=https://github.com/nextcloud/files_pdfviewer|publisher=Nextcloud|access-date=2020-03-28}}</ref><ref>{{Cite web|url=https://apps.nextcloud.com/apps/files_pdfviewer|title=PDF viewer - Apps - App Store - Nextcloud|website=apps.nextcloud.com|access-date=2020-03-28}}</ref> and as a browser extension for [[Google Chrome]], [[Chromium (web browser)|Chromium]],<ref>{{cite web|url=https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm|title=PDF Viewer|website=Chrome Web Store}}</ref> [[Firefox for Android]],<ref>{{cite web|title=Android PDF.js|url=https://addons.mozilla.org/android/addon/android-pdf-js|website=addons.mozilla.org}}</ref> [[Pale Moon (web browser)|Pale Moon]]<ref>{{cite web|title=Add-ons - Moon PDF Viewer|url=https://addons.palemoon.org/addon/moon-pdf-viewer|url-status=dead|archive-url=https://web.archive.org/web/20200103222159/https://addons.palemoon.org/addon/moon-pdf-viewer/|archive-date=January 3, 2020|access-date=May 4, 2021|website=Pale Moon - Add-ons}}</ref><ref name=":1">{{Cite web|title=IsaacSchemm/pdf.js-seamonkey: SeaMonkey fork of pdf.js|url=https://github.com/IsaacSchemm/pdf.js-seamonkey|url-status=live|archive-url=https://web.archive.org/web/20201206160734/https://github.com/IsaacSchemm/pdf.js-seamonkey|archive-date=December 6, 2020|access-date=May 4, 2021|website=[[GitHub]]}}</ref> and [[SeaMonkey]].<ref name=":1" /><ref>{{cite web|title=PDF Viewer for SeaMonkey|url=https://addons.thunderbird.net/seamonkey/addon/pdf-js-for-seamonkey|website=Add-ons for SeaMonkey}}</ref>


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,<ref>{{Cite web|last=Lauraharrisneal|title=Annotations on Document Previews|url=https://dropbox.tech/application/annotations-on-document-previews|access-date=2021-08-05|website=dropbox.tech|language=en}}</ref> [[Slack (software)]],<ref>{{Cite news|date=2016-11-16|title=What matters to you, matters to us. - Slack Engineering|language=en-US|work=Slack Engineering|url=https://slack.engineering/what-matters-to-you-matters-to-us-10ff49650a5d|access-date=2021-08-05}}</ref> and Linkedin for viewing accessible course materials online.<ref>{{Cite web|title=Under the hood: Learning with documents|url=https://engineering.linkedin.com/blog/2019/04/under-the-hood--learning-with-documents|access-date=2021-08-05|website=engineering.linkedin.com|language=en}}</ref> Some software development products are also making it easier to extend PDF.js.<ref>{{Cite web|title=Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling &#124; Hacker News|url=https://news.ycombinator.com/item?id&#61;22763656|access-date=2021-08-05|website=news.ycombinator.com}}</ref><ref>{{Cite web|title=Introducing PDF.js Express|url=https://pdfjs.express/_markdown_template/MarkdownTemplate|access-date=2021-08-05|website=pdfjs.express|language=en}}</ref>
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,<ref>{{Cite web|last=Lauraharrisneal|title=Annotations on Document Previews|url=https://dropbox.tech/application/annotations-on-document-previews|access-date=2021-08-05|website=dropbox.tech|language=en}}</ref> [[Slack (software)]],<ref>{{Cite news|date=2016-11-16|title=What matters to you, matters to us. - Slack Engineering|language=en-US|work=Slack Engineering|url=https://slack.engineering/what-matters-to-you-matters-to-us-10ff49650a5d|access-date=2021-08-05}}</ref> and Linkedin for viewing accessible course materials online.<ref>{{Cite web|title=Under the hood: Learning with documents|url=https://engineering.linkedin.com/blog/2019/04/under-the-hood--learning-with-documents|access-date=2021-08-05|website=engineering.linkedin.com|language=en}}</ref> Some software development products are also making it easier to extend PDF.js.<ref>{{Cite web|title=Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling &#124; Hacker News|url=https://news.ycombinator.com/item?id&#61;22763656|access-date=2021-08-05|website=news.ycombinator.com}}</ref><ref>{{Cite web|title=Introducing PDF.js Express|url=https://pdfjs.express/_markdown_template/MarkdownTemplate|access-date=2021-08-05|website=pdfjs.express|language=en}}</ref>
Line 37: Line 37:
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.<ref>{{Cite web|title=Benchmark: How Reliable is PDF.js?|url=https://pdftron.com/blog/pdf-js/pdf-js-reliability-benchmark/|access-date=2021-08-05|website=PDFTron}}</ref>
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.<ref>{{Cite web|title=Benchmark: How Reliable is PDF.js?|url=https://pdftron.com/blog/pdf-js/pdf-js-reliability-benchmark/|access-date=2021-08-05|website=PDFTron}}</ref>


PDF.js supports most of the PDF specifications, but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.<ref>{{Cite web|title=Guide to Evaluating PDF.js Rendering|url=https://pdftron.com/blog/pdf-js/guide-to-pdf-js-rendering/|access-date=2021-08-05|website=PDFTron}}</ref>
PDF.js supports most of the PDF specifications (including form support or [[XFA]]<ref>{{Cite web|title=1706133 - (pdf-xfa) [meta] XFA support|url=https://bugzilla.mozilla.org/show_bug.cgi?id=1706133|access-date=2022-01-28|website=bugzilla.mozilla.org|language=en}}</ref>) , but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses.<ref>{{Cite web|title=Guide to Evaluating PDF.js Rendering|url=https://pdftron.com/blog/pdf-js/guide-to-pdf-js-rendering/|access-date=2021-08-05|website=PDFTron}}</ref>


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

Revision as of 11:13, 28 January 2022

PDF.js
Original author(s)Andreas Gal
Developer(s)Mozilla
Initial release2 July 2011 (2011-07-02)[1]
Stable release
2.10.377 / 25 July 2021; 3 years ago (2021-07-25)[1]
Preview release
2.11.338 / 24 January 2021; 3 years ago (2021-01-24)[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-compliant 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 included in Firefox since 2012 (version 15)[4][5] and is enabled by default since 2013 (version 19).[6][7] It is also included in Thunderbird[8], ownCloud,[9] Nextcloud,[10][11] and as a browser extension for Google Chrome, Chromium,[12] Firefox for Android,[13] Pale Moon[14][15] and SeaMonkey.[15][16]

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,[17] Slack (software),[18] and Linkedin for viewing accessible course materials online.[19] Some software development products are also making it easier to extend PDF.js.[20][21]

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.[22] 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.[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 c d "Releases · mozilla/pdf.js". GitHub. Retrieved 12 March 2021.
  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. ^ "810815 - Integrate pdf.js to Thunderbird". bugzilla.mozilla.org. Retrieved 28 January 2022.
  9. ^ owncloud/files_pdfviewer, ownCloud, 8 February 2020, retrieved 28 March 2020
  10. ^ nextcloud/files_pdfviewer, Nextcloud, 18 March 2020, retrieved 28 March 2020
  11. ^ "PDF viewer - Apps - App Store - Nextcloud". apps.nextcloud.com. Retrieved 28 March 2020.
  12. ^ "PDF Viewer". Chrome Web Store.
  13. ^ "Android PDF.js". addons.mozilla.org.
  14. ^ "Add-ons - Moon PDF Viewer". Pale Moon - Add-ons. Archived from the original on 3 January 2020. Retrieved 4 May 2021.
  15. ^ a b "IsaacSchemm/pdf.js-seamonkey: SeaMonkey fork of pdf.js". GitHub. Archived from the original on 6 December 2020. Retrieved 4 May 2021.
  16. ^ "PDF Viewer for SeaMonkey". Add-ons for SeaMonkey.
  17. ^ Lauraharrisneal. "Annotations on Document Previews". dropbox.tech. Retrieved 5 August 2021.
  18. ^ "What matters to you, matters to us. - Slack Engineering". Slack Engineering. 16 November 2016. Retrieved 5 August 2021.
  19. ^ "Under the hood: Learning with documents". engineering.linkedin.com. Retrieved 5 August 2021.
  20. ^ "Show HN: Pdf.js Express – PDF annotation, e-signatures, and form filling | Hacker News". news.ycombinator.com. Retrieved 5 August 2021.
  21. ^ "Introducing PDF.js Express". pdfjs.express. Retrieved 5 August 2021.
  22. ^ https://hacks.mozilla.org/2014/05/how-fast-is-pdf-js/
  23. ^ "Benchmark: How Reliable is PDF.js?". PDFTron. Retrieved 5 August 2021.
  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.