How to get the author of a "free text" annotation?

Is it possible to get the author of a free text annotation using iText? I can retrieve the /Type and /Contents, but I can't find a way to get the author.

Posted on StackOverflow on Feb 28, 2015 by john renfrew

If the author value is present, you'll find it in the /T entry. Please consult ISO-32000-1 table 170 "Additional entries specific to markup annotations". It defines a key named /T that is described as an optional text string that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation. The value you seek is not available for every type of annotations, only for markup annotations.

So when you have this in Adobe Acrobat:

Annotations in a PDF

Annotations in a PDF

You'll find this inside the PDF:

Annotations in iText RUPS

Annotations in iText RUPS

You already have the /Contents and /Type entry, now you should also look for the /T entry. If it is missing, the author of the annotation can not be retrieved.



Ready to use iText?

Try our iText 7 Library and add-ons FREE for 30 days. Test your proof of concept, and see if our solution is right for you.

Get my FREE trial
Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now