Hello!
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){
System.err.println(e.getMessage());
}
System.out.println(inReplyTo);
}
}
I attach file, which I use.
(Aspose.Pdf v9.0.0 and v9.1.0 - same result)