The main challenge was that PDF is a substantial specification. Gal says he and Jones were warned it could take a substantial time investment before they could get anything to render. "Fortunately, this turned out to be a less severe issue than we thought," says Gal. "HTML5 offers great high-level APIs for graphics and text rendering, so we didn't have to deal with any of those low-level problems, which greatly reduced what we had to implement. We already render a substantial subset of PDF, and our codebase is still below 5000 lines of code."
Short-term, Gal's blog post suggests the aim is to use pdf.js to render PDFs 'natively' within Firefox, but longer term aims are for a more open approach. "We are targeting HTML5, and any modern browser that supports it. As of today, [pdf.js] works in Firefox and Chrome," he says, adding that Safari and IE9 "both seem to be missing WebGL typed arrays at the moment". Gal hopes they'll catch up with the spec, otherwise a slower workaround might have to be devised for them.