Typically, PDFs are rendered in a browser with a plugin – either with Adobe’s own PDF reader or with another provider’s renderer. These plugins often cannot take full advantage of PDF features. Furthermore, as Gal points out, there is quite a large trusted code base, something that’s forced the Google Chrome browser to have sandbox the PDF renderer in order to avoid code injection attacks. An HTML5 version would be make this more secure, as would the open source nature of the project.
Gal says that Mozilla has been working on pdf.js for about a month. (You can find the GitHub repo here.) The work has been in the open, but on the down low if you will. “We were waiting on the completion of some major features (Type1 fonts, gradients, etc.) before communicating pdf.js more broadly.” There’s still work to be done on the project, according to Gal, and the plan is to use pdf.js to render PDFs “natively” within Firefox.
“It’s important to note that we’re not trying to promote PDF to a first-class web citizen like HTML5 is,” writes Gal. “Instead we hope that a browser-native PDF renderer written on the web platform allows web technologies to subsume PDF.” But with the ubiquity of the PDF, it’s great news – particularly for the mobile Web – that it may soon be easier to view PDFs natively in the browser.