Because it turned out that people wanted to extract text from PDF files (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.
So this PDF file will contain only limited structure tags.
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.
Are you a Developer working with PDF files?
Our developers guide contains a large number of technical posts to help you understand the PDF file Format.
Do you need to solve any of these problems?
Display PDF documents in a Web app |
Use PDF Forms in a web browser |
Convert PDF Documents to an image |
Work with PDF Documents in Java |
Thanks Mark for a great article! I was rather confused about this issue (needed to extract some data from a pdf and didn’t have a clue), and your blog was very informative and helpful. Keep the great posts coming!
Thanks for the encouragement. If you have anything you would like to see, just let us know.