This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/csharp/editor/add-visible-signature-to-pdf.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Add visible digital signatures in C# | Nutrient .NET SDK

Use visible digital signatures to combine visual signoff with cryptographic integrity.

Common use cases include:

  • Contract signing workflows
  • Document approval systems
  • Authenticated signoff pipelines
  • Branded signature appearances

Unlike invisible signatures, visible signatures render a signature area on the page using text or images.

Download sample

How Nutrient helps

Nutrient .NET SDK handles signature field operations, appearance rendering, and cryptographic signing.

The SDK handles:

  • Signature field dictionaries and appearance streams
  • PKCS#12 certificate loading and key extraction
  • Appearance customization and font rendering
  • Byte range calculations and signing internals

Complete implementation

This example adds a visible signature field and signs it with different appearance options:

using Nutrient;

Creating a signature field

Create a signature field at the target location before signing.

In this sample:

The field acts as the visible placeholder for the signed appearance:

using (Document document = Document.Open("input.pdf"))
using (PdfEditor editor = PdfEditor.Edit(document))
{
PdfPage page = editor.PageCollection.First ?? throw new InvalidOperationException("The document has no pages.");
editor.FormFieldCollection.AddSignatureField(
"ApprovalSignature",
page,
100.0f, // x
700.0f, // y
200.0f, // width
50.0f // height
);
editor.SaveAs("output_document_with_field.pdf");
}

Signing with auto-generated appearance

Sign the field with metadata-driven text.

In this sample:

  • DigitalSignatureOptions sets certificate and signer metadata.
  • Document.Open("output_document_with_field.pdf") opens the PDF before signing.
  • Setting UseAutoGeneratedText to true uses signer metadata in the appearance.
  • Setting ShowValidationMark to true adds a validation indicator.
  • SignField(document, outputPath, fieldName, options, appearance) signs "ApprovalSignature".
using (Signature signer = new Signature())
using (Document document = Document.Open("output_document_with_field.pdf"))
{
using DigitalSignatureOptions options = new DigitalSignatureOptions();
options.CertificatePath = "certificate.pfx";
options.CertificatePassword = "Nutrient answers all your document needs";
options.SignerName = "John Doe";
options.Reason = "Final Approval";
options.Location = "New York";
using SignatureAppearance appearance = new SignatureAppearance();
appearance.UseAutoGeneratedText = true;
appearance.ShowValidationMark = true;
signer.SignField(
document,
"output_signed_visible.pdf",
"ApprovalSignature",
options,
appearance
);
}

Signing with a custom image

Use an image-based appearance for handwritten signatures or logos.

In this sample:

  • Document.Open("output_document_with_field.pdf") opens the PDF before signing.
  • ImagePath points to the signature image file.
  • The image renders inside field bounds.
  • Setting ShowValidationMark to true keeps the validation indicator visible.
  • SignField(document, outputPath, fieldName, options, appearance) applies the digital signature.
using (Signature signer = new Signature())
using (Document document = Document.Open("output_document_with_field.pdf"))
{
using DigitalSignatureOptions options = new DigitalSignatureOptions();
options.CertificatePath = "certificate.pfx";
options.CertificatePassword = "Nutrient answers all your document needs";
options.SignerName = "Jane Smith";
options.Reason = "Review Complete";
using SignatureAppearance appearance = new SignatureAppearance();
appearance.ImagePath = "input_signature.jpg";
appearance.ShowValidationMark = true;
signer.SignField(
document,
"output_signed_with_image.pdf",
"ApprovalSignature",
options,
appearance
);
}

Signing with custom text

Use custom text when you need workflow-specific signature content.

In this sample:

  • Document.Open("output_document_with_field.pdf") opens the PDF before signing.
  • Setting UseAutoGeneratedText to false disables metadata-generated text.
  • Text defines the visible signature content.
  • \n creates multiline output.
  • SignField(document, outputPath, fieldName, options, appearance) applies the digital signature.
using (Signature signer = new Signature())
using (Document document = Document.Open("output_document_with_field.pdf"))
{
using DigitalSignatureOptions options = new DigitalSignatureOptions();
options.CertificatePath = "certificate.pfx";
options.CertificatePassword = "Nutrient answers all your document needs";
options.SignerName = "Manager";
using SignatureAppearance appearance = new SignatureAppearance();
appearance.UseAutoGeneratedText = false;
appearance.Text = "Approved by Management\nDate: 2024-01-15";
signer.SignField(
document,
"output_signed_custom_text.pdf",
"ApprovalSignature",
options,
appearance
);
}

Customizing text appearance

Customize typography to match document or brand requirements.

In this sample:

  • Document.Open("output_document_with_field.pdf") opens the PDF before signing.
  • FontName sets the typeface.
  • FontSize sets text size.
  • TextColor sets ARGB color values.
  • SignField(document, outputPath, fieldName, options, appearance) applies the digital signature.
using (Signature signer = new Signature())
using (Document document = Document.Open("output_document_with_field.pdf"))
{
using DigitalSignatureOptions options = new DigitalSignatureOptions();
options.CertificatePath = "certificate.pfx";
options.CertificatePassword = "Nutrient answers all your document needs";
options.SignerName = "Executive";
using SignatureAppearance appearance = new SignatureAppearance();
appearance.UseAutoGeneratedText = false;
appearance.Text = "Approved by Executive Board";
appearance.FontName = "Times New Roman";
appearance.FontSize = 14.0f;
appearance.TextColor = Color.FromArgb(255, 0, 0, 128); // Navy blue
signer.SignField(
document,
"output_signed_styled_text.pdf",
"ApprovalSignature",
options,
appearance
);
Console.WriteLine("Successfully signed all documents");
}

Conclusion

Use this workflow to add visible digital signatures:

  1. Open the document with using statements for automatic resource cleanup.
  2. Create an editor and access the page collection.
  3. Add a signature field at specified coordinates with defined dimensions (e.g. 100, 700, 200×50 points).
  4. The signature field creates a rectangular placeholder for the signature appearance.
  5. Sign the field using Signature with certificate credentials (PKCS#12 format).
  6. Configure signing metadata, including signer name, reason, and location.
  7. Create the signature appearance with auto-generated text (set UseAutoGeneratedText to true) to display metadata.
  8. Add validation marks (set ShowValidationMark to true) to indicate signature validity.
  9. Use custom images via ImagePath for handwritten signatures or company logos.
  10. Use custom text by setting UseAutoGeneratedText to false, with multiline formatting for workflow-specific approvals.
  11. Customize typography with FontName, FontSize, and TextColor using ARGB values.
  12. Save the signed document with visible signature appearance and cryptographic integrity.

For related signing workflows, refer to the .NET SDK guides.