
We were waiting on the completion of some major features (Type1 fonts, gradients, etc.) before communicating pdf.js more broadly. We have been developing pdf.js in the open (on ), albeit quietly, for about a month now. An HTML5-based implementation is completely immune to this class of problems.
#Mozilla pdf reader pdf#
From a security perspective, this enlarges the trusted code base, and because of that Google’s Chrome browser goes through quite some pain to sandbox the PDF renderer to avoid code injection attacks. The traditional approach to rendering PDFs in a browser is to use a native-code plugin, either Adobe’s own PDF Reader or other commercial renderers, or some open source alternative (e.g. Instead we hope that a browser- native PDF renderer written on the web platform allows web technologies to subsume PDF. It’s important to note that we’re not trying to promote PDF to a first-class web citizen like HTML5 is. Also, external PDF readers and many plugins don’t support important PDF features well, including content links and fetch-as-you-go (HTTP range requests).Įxternal readers and plugins are also forced to reinvent their own user interaction paradigms, meaning for example that users might scroll HTML pages in one way with one set of heuristics in the browser, but a totally different way in an external PDF reader. Preview on OS X and PDF View on Android). There are literally millions (billions?) of PDFs floating around the web, and on many devices loading PDFs switches to a different application (e.g. The kinds of operations a PDF reader needs to be fast at –render text, draw lines, blit images– need to be fast in browsers too, so browsers are already highly optimized for them.īuilding an HTML5-based PDF renderer would also answer the question of whether the web platform and in particular canvas and SVG APIs are complete enough to efficiently and faithfully render PDFs.ĭisplaying PDFs directly in the browser would definitely improve the user’s experience. Like many before us, we were wondering why nobody had implemented a PDF reader in HTML5/JavaScript. While traveling to the Firefox 4 launch parties in Seoul and Taipei all the way from California, we killed a lot of time by brainstorming cool things to do with the web platform. pdf.js has moved to a new location on github.
