PdfSignatureOptions Class
The options of a signature: the certificate, the information of the signature dictionary and the time stamp of PAdES B-T.
public sealed class PdfSignatureOptionsConstructors
| Name | Description |
|---|---|
| PdfSignatureOptions(X509Certificate2) | Initializes a new instance of the PdfSignatureOptions class. |
PdfSignatureOptions(X509Certificate2)
PdfSignatureOptions.csInitializes a new instance of the PdfSignatureOptions class.
public PdfSignatureOptions(X509Certificate2 certificate)Parameters
certificateX509Certificate2- The certificate of the signer, with its private key (RSA or ECDSA).
Properties
| Name | Description |
|---|---|
| Appearance | Gets the widget of a visible signature; null (the default) for an invisible signature on the first page. |
| Certificate | Gets the certificate of the signer. |
| Certificates | Gets the other certificates of the chain of the signer, which the signature embeds so that it can be validated. |
| Certification | Gets the changes the signature allows after it, for a certification signature (ISO 32000-2, 12.8.2.2, DocMDP); null (the default) for an approval signature. A certification signature is the first signature of a document. |
| ContactInfo | Gets the contact information of the signer (/ContactInfo). |
| FieldLock | Gets the fields the signature locks (ISO 32000-2, 12.8.2.4, FieldMDP); null (the default) for the lock of the signature field when it has one, or no lock. |
| FieldName | Gets the name of the signature field. The default is Signature followed by the first number not used. An existing signature field that is not signed yet is signed; the name of any other field cannot be used. |
| HashAlgorithm | Gets the digest algorithm. The default is SHA-256. |
| HttpClient | Gets the client the time stamp requests are sent with; null for a client of the library. |
| Location | Gets the place of the signature (/Location). |
| Reason | Gets the reason of the signature (/Reason), such as "I approve this document". |
| ReservedSize | Gets the bytes reserved for the signature in the file; 0 (the default) for a size computed from the certificates and the time stamp. |
| RsaSignaturePadding | Gets the padding of an RSA signature: RSASignaturePadding.Pkcs1 or RSASignaturePadding.Pss (RSASSA-PSS with MGF1 and a salt of the length of the digest, RFC 4055). null (the default) is PKCS #1 v1.5; it must be null for an ECDSA key. |
| SignerName | Gets the name of the signer (/Name), when it is not the name of the certificate. |
| SigningTime | Gets the time of the signature the signer claims (/M). The default is the current time. |
| TimestampAuthority | Gets the URL of the RFC 3161 time stamp authority that stamps the signature, for PAdES B-T; null (the default) for PAdES B-B, a signature without time stamp. |
Appearance
PdfSignatureOptions.csGets the widget of a visible signature; null (the default) for an invisible signature on the first page.
public PdfSignatureAppearance? Appearance { get; init; }Property value
Certificate
PdfSignatureOptions.csCertificates
PdfSignatureOptions.csGets the other certificates of the chain of the signer, which the signature embeds so that it can be validated.
public X509Certificate2Collection Certificates { get; }Property value
Certification
PdfSignatureOptions.csGets the changes the signature allows after it, for a certification signature (ISO 32000-2, 12.8.2.2, DocMDP); null (the default) for an approval signature. A certification signature is the first signature of a document.
public PdfCertificationLevel? Certification { get; init; }Property value
ContactInfo
PdfSignatureOptions.csFieldLock
PdfSignatureOptions.csGets the fields the signature locks (ISO 32000-2, 12.8.2.4, FieldMDP); null (the default) for the lock of the signature field when it has one, or no lock.
public PdfFieldLock? FieldLock { get; init; }Property value
FieldName
PdfSignatureOptions.csHashAlgorithm
PdfSignatureOptions.csGets the digest algorithm. The default is SHA-256.
public HashAlgorithmName HashAlgorithm { get; init; }Property value
HttpClient
PdfSignatureOptions.csGets the client the time stamp requests are sent with; null for a client of the library.
public HttpClient? HttpClient { get; init; }Property value
Location
PdfSignatureOptions.csReason
PdfSignatureOptions.csReservedSize
PdfSignatureOptions.csRsaSignaturePadding
PdfSignatureOptions.csGets the padding of an RSA signature: RSASignaturePadding.Pkcs1 or RSASignaturePadding.Pss (RSASSA-PSS with MGF1 and a salt of the length of the digest, RFC 4055). null (the default) is PKCS #1 v1.5; it must be null for an ECDSA key.
public RSASignaturePadding? RsaSignaturePadding { get; init; }Property value
SignerName
PdfSignatureOptions.csSigningTime
PdfSignatureOptions.csGets the time of the signature the signer claims (/M). The default is the current time.
public DateTimeOffset? SigningTime { get; init; }