Skip to content

Frequently Asked Questions

brendandahl edited this page Dec 6, 2012 · 11 revisions

Can I load a pdf from another server (cross domain request)?

Not by default, but it is possible. Pdf.js runs with the same permissions as any other javascript, which means it cannot do cross origin requests (see Same origin policy and example). There are some possible ways to get around this such as using CORS or setting up a proxy on your server that will feed pdf.js the pdf. Both workarounds are out of the scope of the pdf.js project and we will not provide code to do either.

What browsers are supported?

The goal is to support all HTML5 compliant browsers, but since feature support varies per browser/version our support for all PDF features varies as well. If you want to support more browsers than Firefox you'll need to include compatibility.js which has polyfills for missing features. Find the list of features needed for PDF.js to properly work and browser tests for those features at Required Browser Features. In general, the support is below:

Browser Supported Automated Testing Notes
Firefox Stable yes Windows and Linux
Chrome Stable yes Linux
Opera Stable yes none
IE9 limited none IE9 lacks a number of features and most notably typed arrays which causes subpar performance.
<=IE8 NO none IE8 and below are missing too many features to be supported.

What browsers have extensions(and where can I find install procedures)?

There is currently a Firefox and Chrome extension. The Firefox extension is well supported and actively worked on. The Chrome extension is less active and more experimental. For installing either see the readme.

I know JavaScript and want to contribute to the project. How do I start?

First, you need to prepare your fork and setup the development environment. Don't forget to read the Contributing page. Second, make yourself familiar with the PDF format and PDF.js internals. Third, if you don't already have a certain issue you want to fix, choose one from the open issues labeled 5-good-beginner-bug. Last, submit a pull request for the review. During any part of the process we recommend to communicate with the PDF.js team on #pdfjs IRC channel at irc.mozilla.org if you have questions or need to find a reviewer.