What does "EElPDFDocumentError: Internal error ElPDFDocument.InsertActualSignatureInformation.2" mean?

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

Here's what happens:

When the signature is made for the PDF document, there's a certain free space reserved in the document, and then the actual signature data is inserted into this space. PDF (and especially PAdES) signature is a complex structure, and during signing various revocation 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's timestamped; without making a signature you can't get a timestamp, and without having a timestamp you can't 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 Signature.ExtraSpace property. However, as there's no reliable way to estimate the extra size needed, you need to do the following:

  1. Open the document;
  2. Set ExtraSpace to some value (use 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

Ready to get started?

Learn more about SecureBlackbox or download a free trial.

Download Now