pdf-annotate icon indicating copy to clipboard operation
pdf-annotate copied to clipboard

All Digital Signature info goes missing after adding annotations

Open aashishvanand opened this issue 3 years ago • 2 comments

Hi, I have an existing PDF that is digitally signed. I wanted to add some basic annotations. Let's say I have added a simple square as per the code below and then I save the PDF all the signature info is lost. Probably the best way to do it by supporting incremental updates to the pdf. I am not sure if pdf-annotate supports that

from pdf_annotate import PdfAnnotator, Location, Appearance a = PdfAnnotator('input_signed.pdf') a.add_annotation( 'square', Location(x1=50, y1=50, x2=100, y2=100, page=0), Appearance(stroke_color=(1, 0, 0), stroke_width=5), ) a.write('output.pdf')

aashishvanand avatar Jun 22 '21 10:06 aashishvanand

Hi, it is because you modify the file and the part of the file that contains the signature when you are doing the write(...). You need to do an "incremental save" but I'm not sure "pdf-annotate" has this feature. @aashishvanand did you find another solution ?

pulse-mind avatar Dec 09 '22 14:12 pulse-mind

Does anyone have a solution to this problem?

santi2491 avatar May 10 '23 15:05 santi2491