Because it turned out that people wanted to extract text from PDFs (and not just view them), Adobe added a feature called marked content. This allows the PDF file to contain additional tags as information, preserving the structure of the text. However, this feature needs to be used in the creation of the PDF – otherwise the additional information is not there!
There is a very easy way to tell if the PDF file has been created in this way. Open the file in Acrobat Reader and look at the properties menu – the Tagged PDF menu option (bottom left entry on the advanced section) tells you if the PDF contains these extra tags. This file does not.
If you can create Tagged PDF, it is worth setting this on by default – the files are not much larger and it makes text extraction much more viable if you need it in the future.
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!
Latest posts by Mark Stephens (see all)
- My First Visit to London Book Fair - April 14, 2015
- Sneak preview of upcoming enhancements to our PDF to HTML5/SVG converter - April 13, 2015
- 3 Reasons to attend NetBeans Day in Athens (17-18 April 2015) - March 24, 2015
- NetBeans Day UK – Friday 29th May 2015 - March 23, 2015
- Why we are abandoning ImageIO and JAI for Image support in our commercial Java code - March 19, 2015