Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

What does the ActualText dictionary tag do?

29 sec read

Text is defined in the PDF file format as a display value (normally what you see onscreen) and an extraction value. It is useful to have 2 options because some characters are displayed differently to what you extract (for example fl is one glyf onscreen but two in extracted text).

But did you know you can have an additional value set to show the actual Text enclosed in a Tj command? If you are using Marked Content, the Dictionary can contain a Dictionary value /ActualText which will be used in place of whatever is shown in the Tj command, which is ignored for extraction purposes. So if you want to add something different (or just ensure that the value comes out exactly as you want, it is a useful feature. What would you use it for? 



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

Are you a Developer working with PDF files?

Learn more about PDF file format
Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Leave a Reply

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

IDRsolutions Ltd 2022. All rights reserved.