PDF Supports document versions. This means that the current document can be saved unchanged, and we can change the content and presentation of the document by simply adding information. This feature is especially useful for checking the appearance and integrity of a document in past digital signatures.
For a better understanding of what I mean, check out this Digital Signature PDF - Adobe document in Figure # 5.
I saw a lot of documentation and samples from PyPDF2 and other python libraries that add content to a PDF file. However, while I saw all the examples with pyPDF2 , they take the contents from one file and rebuild the contents to another. Can we do this without losing or violating digital signatures for the latest versions?
Do you know a way to raw copy past versions and just create a new version of a document that reuses objects from previous ones?
Or is there a way to directly modify the document? I mean, download the document for reading and writing.
Other examples of PyPDF2 can be found:
As you will see, they all rebuild the PDF reading from the PdfFileReader and write using the PdfFileWriter . I mean, they need something like this PdfStamper java class with an optional boolean parameter append, which will respect the previous content and update the existing PDF in stages.
yucer source share