PDF Rendering on the Web

This is a demo of rendering a PDF document entirely in JavaScript, without any plugins. It uses Poppler, an open source PDF library, which was compiled to JavaScript using Emscripten. Also used in this demo is FreeType for font rendering.

After the PDF is decoded into pixel data, it is rendered using a Canvas element. This demo should therefore work in any web browser that supports the Canvas element.

Click 'Go!' to render a example PDF file.

You can also change the URL to that of a PDF document, which will be downloaded and rendered. In order to process the binary data, mozResponseArrayBuffer is used, which is specific to Firefox 4. Note also that the usual limitations of cross-site XHRs apply, so you may not be able to download PDFs from random servers (as an example, try emscripten.pdf, which is a PDF of Emscripten's home page, on this server).



PDF 2000 URL: