Pdf | |
The PdfDigitalSignatureElement type exposes the following members.
| Name | Description | |
|---|---|---|
| PdfDigitalSignatureElement(RectangleF, PdfDigitalCertificate) | Constructs a digital signature element that can be added to a pdf document page. | |
| 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. | |
| ContactInfo | Gets or sets the contact information. | |
| Location | Gets or sets the location of the signing. | |
| Reason | Gets or sets the reason for the signing. | |
| 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. |
PdfDigitalCertificatesCollection certs =
PdfDigitalCertificatesStore.GetCertificates(@"C:\certs\signer.pfx", "secret");
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");