IText AllowAssembly and StandardEncryption

I am trying to sign a PDF document while retaining the ability to change annotations and allowing pages to be added and removed with itextsharp, Version=4.1.6.0

. Below is my current code:

var signatureStamper = PdfStamper.CreateSignature(pdfReader, memoryStream, '\0', null);
signatureStamper.SetEncryption(null, Encoding.UTF8.GetBytes(certificationBundle.Password), PdfWriter.ALLOW_PRINTING | PdfWriter.ALLOW_MODIFY_ANNOTATIONS | PdfWriter.AllowAssembly, PdfWriter.STANDARD_ENCRYPTION_128);

      

However, with this configuration, I still cannot add and remove pages. Am I using it incorrectly PdfWriter.AllowAssembly

?

+3


source to share


1 answer


I am trying to sign a PDF document while keeping modifying annotations and allowing pages to be added and removed

Addition or deletion of pages is never permitted for signed documents, cf. this answer . In most cases, you are allowed to do the following:



  • Adding signature fields

  • Add or edit annotations

  • Supplying form field values

  • Digital signature

+2


source







All Articles