Pdf | |
The PdfDigitalSignatureElement type exposes the following members.
| Name | Description | |
|---|---|---|
| PdfDigitalSignatureElement(RectangleF, IPdfExternalSigner) | Constructs a digital signature element signed by an external signer - a key held in a hardware security module, a smart card or a key service. | |
| PdfDigitalSignatureElement(RectangleF, PdfDigitalCertificate) | Constructs a digital signature element that can be added to a pdf document page. | |
| PdfDigitalSignatureElement(Single, Single, Single, Single, IPdfExternalSigner) | Convenience overload — creates the externally signed signature from explicit x / y / width / height values. | |
| PdfDigitalSignatureElement(Single, Single, Single, Single, PdfDigitalCertificate) | Convenience overload — creates the signature from explicit x / y / width / height values. |
| Name | Description | |
|---|---|---|
| ActualText |
Gets or sets the exact text represented by this element (the structure element's
/ActualText entry), used when the drawn glyphs do not map to readable text.
(Inherited from PdfPageElement) | |
| AlternateText |
Gets or sets the alternate text describing this element for assistive technology (the
structure element's /Alt entry). Required on figures for PDF/UA conformance.
(Inherited from PdfPageElement) | |
| Artifact |
Gets or sets a value indicating whether this element is an artifact — decorative or layout
content that carries no meaning and is excluded from the logical structure (backgrounds,
rules, running headers). Takes precedence over TagType.
(Inherited from PdfPageElement) | |
| Certificate | Gets the certificate used to create the signature, or null when the element was created with an external signer. | |
| ContactInfo | Gets or sets the contact information. | |
| DigestAlgorithm | Gets or sets the hash algorithm the signature is computed with. | |
| EnableLtv | Gets or sets a value indicating whether the signature is made LTV-enabled (long-term validation). | |
| Layer |
Gets or sets the layer (optional content) the element is drawn in: shown and hidden with it in a viewer, printed
as the layer says. Null (default) draws it on the page itself, or in the layer of the template it is added to
(Layer). The layer must belong to the document the element is added to.
(Inherited from PdfPageElement) | |
| Location | Gets or sets the location of the signing. | |
| Reason | Gets or sets the reason for the signing. | |
| SignatureBackgroundImage | Gets or sets an image drawn behind the text of the visible signature - a company logo, a seal, a scanned handwritten signature - in place of the default mark. | |
| SignatureBackgroundOpacity | Gets or sets how strongly the background of the visible signature is drawn, from 0 (no background) to 1 (the image's own colours). | |
| TagType |
Gets or sets the structure type used to tag this element in a tagged (accessible) document.
Ignored unless the document's tagged mode (PdfDocument.Tagged) is enabled. Null
(default) leaves the element untagged unless Artifact is set.
(Inherited from PdfPageElement) |
| Name | Description | |
|---|---|---|
| SetDate | Specify the date when the document was signed. If this method is not called, the current date is set by default. |
// The document is signed when it is saved: // dispose of the certificates after the save. using PdfDigitalCertificatesCollection certs = PdfDigitalCertificatesStore.GetCertificates(@"C:\certs\signer.pfx", "secret"); using PdfDocument document = new PdfDocument(); PdfPage page = document.AddPage(); SelectPdf.Universal.Drawing.RectangleF bounds = new SelectPdf.Universal.Drawing.RectangleF(60, 60, 240, 70); PdfDigitalSignatureElement signature = new PdfDigitalSignatureElement(bounds, certs[0]); signature.Reason = "I approve this document"; signature.Location = "Bucharest"; page.Add(signature); document.Save("signed.pdf");