'Hocus Pocus 2' Review Wi-Fi 6 Router With Built-In VPN Sleep Trackers Capital One Claim Deadline Watch Tesla AI Day Student Loan Forgiveness Best Meal Delivery Services Vitamins for Flu Season
Want CNET to notify you of price drops and the latest stories?
No, thank you

Firefox PDF reader passes 'pixel-perfect' test

With the release of pdf.js version 0.2, the JavaScript-based PDF-reading software can fully handle a test document. Next up: faster performance.

Mozilla's pdf.js software, which uses Web-based display technologies such as JavaScript and HTML5, now sports a multi-page scroll option on the left.
Mozilla's pdf.js software, which uses Web-based display technologies such as JavaScript and HTML5, now sports a multi-page scroll option on the left.
screenshot by Stephen Shankland/CNET

Mozilla programmers have achieved a goal to build a PDF reader out of Web programming technology, the "pixel-perfect" rendering of a particular file.

The file, a research paper on fast execution of JavaScript (PDF), contains formatted text, graphics, tables, and graphical diagrams. With the high-quality rendering, programmers Andreas Gal and Chris Jones declared the pdf.js mature enough to warrant the 0.2 version number yesterday.

The pdf.js project, introduced to the world in June, uses JavaScript and HTML5's Canvas For to process and display the file. Version 0.2 adds a better user interface, support for TrueType fonts, improved graphics abilities, and more. For a look at how the Web-based tool performs, you can read the JavaScript paper with pdf.js online, too. It works with Firefox in my tests, but other browsers aren't supported--yet.

"We intend pdf.js to work in all HTML5-compliant browsers. And that, by definition, means pdf.js should work equally well on all operating systems that those browsers run on," but right now it requires a nightly build of Firefox, the programmers said. "The [PDF research] paper is rendered less well on other platforms and in older Firefoxen, and even worse in other browsers. But such is life on the bleeding edge of the Web platform."

Firefox logo

The Mozilla plan is to include the software within Firefox itself. "We would love to see it embedded in other browsers or Web applications; because it's written only in standards-compliant web technologies, the code will run in any compliant browser," the programmers added.

PDF files are widespread on the Net and visible in Google search results, among other places. But they can be slow to load and in the past relied on an Adobe browser plug-in that behaved very differently from the browser itself. The pdf.js project holds the potential of helping to make PDF a more ordinary document type for browsers.

Next up is a performance improvements in the form of support for Web Workers, which enable background JavaScript processing tasks. That should improve rendering speed and reduce user-interface delays.

Also on the list is a more ambitious test document, the official PDF 1.7 specification (PDF), a sprawling 1,310-page, 31MB file.

A big missing feature, though, is the ability to copy text. That relies on a later phase of work that could use the SVG (Scalable Vector Graphics) standard.

Google's Chrome has a built-in PDF reader within the browser itself, but it's not perfect. It's aware of its shortcomings, though: when it tries to download the PDF reference document, it warns it can't show it all suggests opening it in Adobe Reader.