Hi.
We have a issue with text annotation. When we added highlight annotation to the PDF document, it is offset from the original text (see attached screen).
image.png (12.2 KB)
Could you, pls, describe the reason why?
Java code snippet
@Test
void addAnnotationTest(){
var document = new Document(“Pages.pdf”);
var page = document.getPages().get_Item(1);
var absorber = new TextFragmentAbsorber();
absorber.setPhrase(“01Nov2017”);
page.accept(absorber);
var textFragment = absorber.getTextFragments().get_Item(1);
var annotation = new HighlightAnnotation(page, textFragment.getRectangle());
page.getAnnotations().add(annotation);
document.save(“result.pdf”);
}
Pages.pdf (429.0 KB)