Skip to main content
Skip table of contents

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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.