SecureBlackbox 16: Resolving the Error EElPDFDocumentError: Internal error ElPDFDocument.InsertActualSignatureInformation.2

Note: This article applies only to SecureBlackbox Legacy. For future development please consider using the latest version.

This error happens when there is not enough space available for the signature in the document.

What happens:

When the signature is made for the PDF document, there is a certain amount of free space reserved in the document, and the actual signature data is inserted into this space. PDF (and especially PAdES) signatures have a complex structure, and during signing, various revocation processes, and timestamping, related information is retrieved and assembled into this structure. The total size of this information is not known before the procedure (e.g., you make a signature, then it is timestamped; without making a signature you cannot get a timestamp, and without having a timestamp you cannot know how much space is needed to accommodate timestamp-related information).

You can reserve some extra space if you expect the signature to be large, using the Signature.ExtraSpace property. However, as there is no reliable way to estimate the extra size needed, you need to do the following:

  1. Open the document.
  2. Set ExtraSpace -- use a larger value with each iteration.
  3. Try to sign the document.
  4. If error happens, close the document and proceed to step one with increased value for ExtraSpace.

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.