[Root] / Xceed.PdfLibrary.NET Assembly / Xceed.PdfLibrary.NET Namespace / PdfDocument Class / Sign Method
The SignatureFormField that will be used to sign the PdfDocument; an already signed FormField can't be use to sign a PDFDocument.
The credential that will be used to sign the PDFDocument. It can be PfxSigningCredential, StoreSigningCredential or ExternalSigningCredential.
The options that will be used to sign the PDFDocument.
In This Topic
    Sign Method
    In This Topic
    Signs the PdfDocument.
    Syntax

    Parameters

    formField
    The SignatureFormField that will be used to sign the PdfDocument; an already signed FormField can't be use to sign a PDFDocument.
    credential
    The credential that will be used to sign the PDFDocument. It can be PfxSigningCredential, StoreSigningCredential or ExternalSigningCredential.
    signatureOptions
    The options that will be used to sign the PDFDocument.
    Remarks
    This will automatically save the PDFDocument and sign it with the current configuration. Modifying the document after calling Sign() will result in an invalid signature.

    Note that a signatureFormField can only have one signature; if the signatureOption's IsCertified property is true when signing a PdfDocument, than this signature can't be removed.

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also