Generating Pdf A/1A: trouble signing

My problem is the following:

  • I convert a Word document into a pdf with the Aspose.Words DLL
  • Then I convert this new pdf into Pdf A/1A
  • Once I have the pdf A/1A, I sign it with our signature tool (not with Adobe)
  • I open the signed document with Acrobat Reader and do “Save As”.
  • When doing this operation, it tells me that the document has been modified, so the signature is not validated.

If I do all the operations described above with a pdf document generated from Word, the signature is not corrupted.

Thank you very much for the help

@AYTOIRUN You can do the first three steps in your list using Aspose.Words:

Document doc = new Document(@"C:\Temp\in.docx");

PdfSaveOptions options = new PdfSaveOptions();

// Specify PDF compliance.
options.Compliance = PdfCompliance.PdfA1a;

// Specify signature.
CertificateHolder certificateHolder = CertificateHolder.Create(@"X:\Aspose.Words-for-.NET\Examples\Data\morzal.pfx", "aw");
options.DigitalSignatureDetails = new PdfDigitalSignatureDetails(certificateHolder, "Test Signing", "My Office", DateTime.Now);
options.DigitalSignatureDetails.HashAlgorithm = PdfDigitalSignatureHashAlgorithm.Sha256;

doc.Save(@"C:\Temp\out.pdf", options);

After opening the output document in Acrobat and doing Save As in the output document is see "The document has not been modified since this signature was applied".

Hello Alexey

Thank you very much for your answer.
I have tried the solution you provided and it works perfectly.

All the best

1 Like

A post was split to a new topic: Convert a normal PDF document into a PDF A/1A