GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfDigitalSignatureSaveOptions Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a class that stores details for signing a document saved to a Portable Document Format (PDF) with a digital signature.

    • C#
    • VB.NET
    public class PdfDigitalSignatureSaveOptions : DigitalSignatureSaveOptions
    Public Class PdfDigitalSignatureSaveOptions
        Inherits DigitalSignatureSaveOptions
    Inheritance:
    System.Object
    DigitalSignatureSaveOptions
    PdfDigitalSignatureSaveOptions
    Remarks

    Presentation will be digitally signed when saved to a PDF if Certificate, CertificateBytes or CertificatePath is specified, if PdfDigitalSignatureSaveOptions instance is created with FromSigner(Func<String>, Func<Int32>, Func<Stream, Byte[]>) method or if Sign(Stream) method is overridden, otherwise it will be saved but not digitally signed.

    note

    If your project doesn't target Windows platform, to use PdfDigitalSignatureSaveOptions, make sure your project references NuGet package System.Security.Cryptography.Pkcs.

    Constructors

    PdfDigitalSignatureSaveOptions()

    Initializes a new instance of the PdfDigitalSignatureSaveOptions class.

    • C#
    • VB.NET
    public PdfDigitalSignatureSaveOptions()
    Public Sub New

    Properties

    ContactInfo

    Gets or sets the contact information.

    • C#
    • VB.NET
    public string ContactInfo { get; set; }
    Public Property ContactInfo As String
    Property Value
    System.String

    Information provided by the signer to enable a recipient to contact the signer to verify the signature; for example, a phone number.

    IsAdvancedElectronicSignature

    Gets or sets a value indicating whether the signature is PDF Advanced Electronic Signature (PAdES).

    • C#
    • VB.NET
    public bool IsAdvancedElectronicSignature { get; set; }
    Public Property IsAdvancedElectronicSignature As Boolean
    Property Value
    System.Boolean

    true if the signature is PDF Advanced Electronic Signature (PAdES); otherwise, false.

    See Also
    PAdES baseline signatures
    Extended PAdES signature profiles

    Location

    Gets or sets the CPU host name or physical location of the signing.

    • C#
    • VB.NET
    public string Location { get; set; }
    Public Property Location As String
    Property Value
    System.String

    The CPU host name or physical location of the signing.

    Methods

    FromSigner(Func<String>, Func<Int32>, Func<Stream, Byte[]>)

    Initializes a new instance of the PdfDigitalSignatureSaveOptions class from the specified signer.

    • C#
    • VB.NET
    public static PdfDigitalSignatureSaveOptions FromSigner(Func<string> signatureFormatFunc, Func<int> estimatedSignatureLengthFunc, Func<Stream, byte[]> computeSignatureFunc)
    Public Shared Function FromSigner(signatureFormatFunc As Func(Of String), estimatedSignatureLengthFunc As Func(Of Integer), computeSignatureFunc As Func(Of Stream, Byte())) As PdfDigitalSignatureSaveOptions
    Parameters
    signatureFormatFunc
    System.Func<System.String>

    A delegate that returns the format of the signature content that the signer produces.

    estimatedSignatureLengthFunc
    System.Func<System.Int32>

    A delegate that returns the estimated length of the signature content (in bytes) that should be large enough to contain the entire data returned by the computeSignatureFunc delegate.

    computeSignatureFunc
    System.Func<System.IO.Stream, System.Byte[]>

    A delegate called when saving the PDF file that takes the PDF file stream (without signature's Contents entry) as an input and returns the signature that will be set as the value of the signature's Contents entry.

    Returns
    PdfDigitalSignatureSaveOptions

    A new instance of the PdfDigitalSignatureSaveOptions class from the specified signer.

    Inherited Properties

    Certificate

    Gets or sets the X.509 certificate.

    Value must be of type System.Security.Cryptography.X509Certificates.X509Certificate2.

    (Inherited from DigitalSignatureSaveOptions)

    CertificateBytes

    Gets or sets the byte array that contains data from an X.509 certificate.

    (Inherited from DigitalSignatureSaveOptions)

    CertificatePassword

    Gets or sets the password required to access the X.509 certificate data.

    (Inherited from DigitalSignatureSaveOptions)

    CertificatePath

    Gets or sets the file path to the X.509 certificate.

    (Inherited from DigitalSignatureSaveOptions)

    Reason

    Gets or sets the reason for the signing.

    (Inherited from DigitalSignatureSaveOptions)

    Signature

    Gets or sets the signature.

    (Inherited from DigitalSignatureSaveOptions)

    UseMachineKeySet

    Gets or sets a value indicating whether private keys are stored in the local computer store rather than the current user store.

    (Inherited from DigitalSignatureSaveOptions)

    Examples

    PDF digital signature examples
    PAdES signature (LTV enabled) example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.