Am 07.10.23 um 06:43 schrieb John Lussmyer:
I doubt there is a way.
It's most likely that the signing code makes a MD5 checksum (or similar) of the file when it is signed. If the file is changed, checking the signing will re-calculate the checksum and find that it is different.  There isn't any info on what changed, just that SOMETHING changed.
IMHO there two possible cases of manipulation ...

First, someone changed the signed part of a pdf so that the checksum is altered and doesn't match with the checksum when signing the pdf. In such cases it is hard to say which object was altered without doing a diff.

Second, someone adds some content to a signed pdf using incremental save. In such cases the signed part itself is still intact w.r.t the signature but the new one isn't if the pdf isn't signed a second time. In such cases the objects in question are at the end of the pdf, simply appended to the origin pdf.

I guess Marcs question is about the second one.

PDFBox doesn't store the information about the origin of the xref entry so that we are not able to mark objects added by an incremental update.

For now, TIlmans suggestion to use an editor of your choice to inspect the pdf is the way to go. As I said, the objects your are looking for are at the end of the pdf, right after the end of the origin pdf.


Andreas

On 10/6/2023 8:50 PM, Tilman Hausherr wrote:
On 06.10.2023 19:50, Marc Kaufman wrote:
I find myself debugging PDF files where Acrobat claims "Document has been altered or corrupted since it was signed." I would dearly love to see which objects belong to the last xref (color code is OK). Has anyone added that feature to PDF Debugger, or know where I can find one? Just comparing revisions is not enough, since sometimes the "changed" object is identical to the same object in the previous revision.

I don't know of any. I research such questions the hard way, with NOTEPAD++.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to