Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

How are PDFs displayed?

Question

How are PDFs displayed? If I wanted to create my own PDF viewer, how steps would be required?

Answer

To display/render a PDF page the following steps need to be taken:

  1. Locate the page object in the PDF.
  2. Extract the page's content streams (one or more strings).
  3. Parse the content stream to get the page description commands - these are similar to PostScript language commands
  4. The content streams commands refer to one or more resources (fonts, images, etc.) - these resource objects are located in the PDF and images are decoded and fonts are processed to obtain the glyph outlines.
  5. As the page content is followed there are operations that adjust the user matrix which change the position, scaling and rotation.
  6. These commands / objects collectively describe the page in mathematical terms and are then converted into an appropriate output - either an image (using GDI+ in our case) or a different graphical language like EPS, EMF/WMF etc.

Text is simply a collection of shapes just like other graphic content.

Quick PDF Library, Adobe Acrobat and Foxit Reader all follow these same steps in order to display a PDF.


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum