Rendering PDFs with pdf.js using HTML5 and JavaScript

added by deanomachino
10/13/2011 9:26:01 AM

683 Views

A couple of clever guys over at Mozilla have thought about this and have come up with a genius way of displaying PDFs inside your browser using Javascript and HTML5. The code is available for download on Github. PDF.js is community-driven and supported by Mozilla Labs which means its good news for us as developers. In the long run this plugin is intended to render PDFs natively within Firefox itself and will eventually ship with Firefox. For now though, we can start using the power of this plugin within our applications today.


4 comments

dpeterson
10/13/2011 9:27:06 AM
I'm glad to see a viable alternative to security-hole-ridden plugins when it comes to PDFs. I just want to view my document, this gives me that.
I think this kills 2 birds as well, since plugins are no longer supported in IE in Windows 8 this could be the solution.

Noldorin
10/13/2011 10:07:15 AM
This is pretty cool, yeah. Does it spell the beginning of a transition away from PDFs and fully to HTML5? The death of Adobe Reader perhaps?

vijayst
10/13/2011 12:12:26 PM
I am curious to know how it works :) This is really good stuff.

bradygaster
10/13/2011 2:57:44 PM
I wish I'd had this on project x, project y... This could make life pretty easy for doing PDF output. I wonder about more complicated documents and if there's support for forms and some of the more rich/interactive aspects of PDF's. Not that those features are ones I've had to use very often; most times PDF is for output only and this looks like a GREAT option for that.