Why is "Document Assembly" always reporting “Not Allowed” in some other PDF readers?


How to get rid of the “Document Assembly” “Not Allowed” option shown in some PDF viewers?

For instance, even if we explicitly set the encryption permission to true/allowed in PDFNet, it is still shown as not allowed in other viewers?

new_handler.SetPermission(SecurityHandler.Permission.e_assemble_doc, true);


It appears that other 3rd party vendors overload the “Document Assembly” setting to reflect more than just the Security Permission.

  1. For instance, Adobe Acrobat always shows as not allowed, since it doesn’t support editing the PDF, while the same PDF in Adobe Acrobat Pro will show it as allowed.
  2. If the PDF is digitally signed, which means any edits will invalidate the signature, then “Document Assembly” will show not allowed.

Note: It appears that PDF/A files do not get this treatment, even though they too should be treated as read-only just like a digitally signed PDF.

Finally, note that all the security permissions are not true permissions, they are only enforced by the PDF reader software. There is no way for the document itself to enforce these permissions. Unlike Digital Signatures, which will they cannot prevent edits, at least make it clear that an edit has happened.

To help ensure that Document Assembly is allowed on a PDF you can do the following two actions.

  1. Erase security.


  1. Erase the DigSig flag (this invalidates the signature, but if your objective is to edit the file anyway, then it would be invalidated regardless when you edit).

Obj acroForm = z.GetAcroForm(); if(acroForm != null && acroForm.IsDict()) { acroForm.Erase("SigFlags"); }