0

I'm trying to flatten some annotations that already come in a pdf from the PDPage class, but I can't find the way to do it. Because a viewer we have made in view shows some annotations and not others. Any idea with pdfbox and the PDPage class?

PereZix
  • 41
  • 4
  • Please be aware that different PDF processors are free to display annotations differently. Once flattened, though, the way the flattener would display that appearance becomes ingrained in the PDF. So if your annotations don't have appearance streams, they may surprise you in appearance after flattening. Is that ok for you? – mkl Sep 16 '21 at 17:25
  • Actually the problem I have exactly is when I have a document with a signature (annotation) and I rotate the page and save, the signature is rotated with the page, but when I reopen the document the page is rotated, but the signature is not – PereZix Sep 16 '21 at 18:11
  • There is an annotation flag that tells an annotation not to rotate when the page is rotated. Have you checked whether that flag is set on your signature widget annotation? – mkl Sep 16 '21 at 19:45
  • yes I checked that field, but the annotation remains the same, it does not rotate with the page. annotation.setNoRotate(true); – PereZix Sep 17 '21 at 15:39
  • If you want it to rotate, you should set **NoRotate** to `false`. – mkl Sep 17 '21 at 20:14

0 Answers0