We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

freeTextAnnotation.getInReplyTo() throws NullPointerException


I tried to read repliy from annotation in PDF document. But when I call method getInReplyTo it always throws exception. This is my example code:

Document document = new Document(“C:\Users\liosha\Desktop\Exported.pdf”);

Page page = document.getPages().get_Item(1);

AnnotationCollection annotations = page.getAnnotations();

for (int n = 1; n < annotations.size(); n++){

Object o = annotations.get_Item(n);

if (o instanceof FreeTextAnnotation){

FreeTextAnnotation freeTextAnnotation = (FreeTextAnnotation) o;

Annotation inReplyTo = null;

try {

inReplyTo = freeTextAnnotation.getInReplyTo();

} catch (NullPointerException e){






I attach file, which I use.

(Aspose.Pdf v9.0.0 and v9.1.0 - same result)

Hi there,

Thanks for your inquiry. Your your query is related to Aspose.Pdf component. I am moving this forum thread to Aspose.Pdf forum. My colleagues from Aspose.Pdf team will reply you shortly.


Thanks for contacting support.

have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-34233. We will
investigate this issue in details and will keep you updated on the status of a
correction. <o:p></o:p>

We apologize for your inconvenience.

The issues you have found earlier (filed as PDFNEWJAVA-34233) have been fixed in Aspose.Pdf for Java 9.5.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.