Interesting PDF bugs – ‘Phantom’ PDF objects

I have been looking at some Annotation issues and came across an interesting feature in a sample PDF file. I viewed it in Acrobat’s viewer and saw the following.

PDF object view

It is a freetext annotation with an AP object to define how it appears. It was not appearing in our PDF viewer so I dug down and found we were not reading the AP object (number 22). Then I opened up the raw PDF file to see why, which is where it gets very interesting…

Actual PDF data

The PDF only contains 21 objects and there is no AP object attached to the Annotation. The object that I am seeing in Adobe Acrobat is actually a ‘synthetic’ object created by Adobe – it does not exist in the file. So does it really exist?

This post is part of our “Understanding the PDF File Format” series. In each article, we discuss a PDF feature, bug, gotcha or tip. If you wish to learn more about PDF, we have 13 years worth of PDF knowledge and tips, so click here to visit our series index!

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>