I need to do a signature in pdf like this when trusted certificate:
When certificate is unknown origin then display a "?".
I can do the signature, but not display "✔" or "?".
Please consult PAdES part 6 (aka ETSI TS 102 778-6), more specifically section 6 entitled "The visual representation of AdES signature verification".
I quote:
A conforming signature handler shall not display the result of the signature validation inside the page content.
NOTE: The conforming signature handler will use off-page display to present the verification result.
If you are asking a way to use iText(Sharp) to add a green check mark to the visual representation of a signature in a PDF file, you are looking to achieve something that is in violation with PAdES-6, and that will be in violation of ISO-32000-2.
I have access to the draft of section 12.8 of ISO-32000-2 (I redacted it), and this is what it will say:
the information included in the appearance dictionary shall not be used by a signature verification handler at the time of signature verification. It is there strictly for the purpose of providing a way for a human verifier to perform their own verification of the visual representation. A PDF processor shall not incorporate the validation status of a signature (e.g. a checkmark for passed or an X for failed) into the appearance of the signature field.
In other words: your question is wrong. You are asking a way to produce PDFs that will not be valid according to the PDF specification.
The green check mark, the red cross, the yellow rectangle,... Those are all visual indications regarding the state of the signature (valid, invalid, unknown) that should be used by the application that consumes the signed PDF (e.g. the PDF viewer). You are asking for a way to add such a symbol through an application that produces the signed PDF, which is forbidden by the PDF specification.
The question you should ask is: "when do I get a green check mark in a PDF viewer for a signed PDF with a valid signature?"
Read http://itextpdf.com/book/digitalsignatures for more info.