Closed itechbear closed 6 years ago
I think I've found some clues.
Firstly, use pageObject['Annots'] to obtain the Annotation Object Array. Given the annotation object id annotationObjectID, use pdfReader.queryArrayObject(pageObject['Annots'], annotationObjectID) to obtain the original annotation. pdfReader.queryArrayObject(pageObject['Annots'], annotationObjectID).toJSObject() can be used to inspect fields information of the old annotation. Then I can create a new annotation, copy the information of the old annotation to it and write it to the pdfPage.
Hi, thanks for such an amazing library. I'm trying to integrate it to my own software, which manipulates annotations of PDF files.
I've figured out how to add a highlight annotation, with PdfWriter, FormXObject, ObjectContext etc. But for updating annotations, specifically, updating some field of an annotation (for example, the /Comment field), I didn't find much useful information. Can you please guide me on how to do it?