I am trying to merge a pdf that is locked with a certificate signature (using acrobat reader), and I am running into an error. This error occurs regardless of whether I use streams or PDFDocument and append to do the merge. The error always occurs when the Save function is called. I would like for it work, and if not at least have a mechanism to detect up front that the document cannot be merged. The code that I used is part of the attached zip; also, the pdf file that I used to test this failure is part of the zip too.
Attachment:
Locktest_33b85741.zip