0

I am using iText for PDF manipulation. In my scenario I am getting the Certify Policy applied on the specific document but iText always returns 0 in any document case. I am using the following code snippet:

PdfSigner pdfSigner = new PdfSigner(_pdfReader, outputStream, new StampingProperties().UseAppendMode());
int certificationLevel = pdfSigner.GetCertificationLevel();

The document is attached on the following link for reference:

https://1drv.ms/b/s!AvIgyv7xAxxoig9eXND6b14wJGtK?e=A3eM1c

1 Answer 1

1

PdfSigner.GetCertificationLevel() does not return the certification level implied by existing signatures as you assume.

Instead it returns the certification level of the signature this PdfSigner will create.

As you have not yet called PdfSigner.SetCertificationLevel(), the default level 0 (NOT_CERTIFIED, a mere approval signature) is returned.

2
  • Thanks for the quick response. Is there any way to get the certification level implied by existing signature? Nov 18, 2019 at 7:24
  • @MuddassirAwan this answer outputs the relevant Modification Detection and Prevention information.
    – mkl
    Nov 18, 2019 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.