Lessons from the dragon: compiling PDF to machine code

  • Authors:
  • Steven R. Bagley

  • Affiliations:
  • University of Nottingham, Nottingham, United Kingdom

  • Venue:
  • Proceedings of the 10th ACM symposium on Document engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Page Description Languages, such as PDF or PostScript, describe the page as a series of graphical operators, which are then imaged to draw the page content. An interpreter executes these operators one-by-one every time the page is rendered into a viewable form. Typically, this interpreter takes the form of a tokenizer that splits the page description into the separate operators. Various subroutines are then called depending on which tokens are encountered. This process is analogous to instruction execution at the heart of a CPU: the CPU fetches machine code instructions from memory and dispatches them to the various parts of the chip as necessary. In this paper, we show that it is possible to compile a page description directly into machine code, bypassing the need to interpret the page description. This can bring a speed increase in PDF rendering -- particularly important on low-power devices -- and could also help increase document accessibility