mozilla/pdf.js — pull request #994 by brendandahl (2011-12-29 21:54:23+00:00)
Title: Type4 PostScript Functions

Fixes #843, resolves #813.

Uses a simple recursive descent parser to build the "assembly code" that is then evaluated to convert color values. I tried to write unit tests for most of the parser and evaluator, but I skipped a number of operators that I deemed straightforward.

I also added the unit test files to the linter and fixed obj_spec.js.

@kkujala Thanks for setting up the unit test stuff!

Last, if anyone is interested in trying more files, the following from the corpus report have type4 functions:

- 101201privacyreport_140e0473c90d7e5ccde642418b770603.pdf
- 157a_96f53a98f1cb552e2ca42ce07000d467.pdf
- 210346_956b9c05fe52e9eae4084969dfddc8d7.pdf
- AdultandAdolescentGL_4e2689d01740db0a7d59803aa2a642e5.pdf
- energy_savers_a41bcbe213f639fe027c1f713adf5bd8.pdf#page=4
- rcrintro_83b30025c2b48c02ff62bf1d8530566a.PDFS
- w32_stuxnet_dossier_a04c5cec69bba6b67b52b3494321a7ce.pdf
- wp-operation-shady-rat_554d8b84f740e33745c5ef6e6788ed35.pdf