# Digital Signature Examples

> Sign PDF documents in WPF with SaveSettings.DigitalSignature: whole documents, signature fields, PFX files, smart card certificates and timestamps.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > Examples > Digital Signature Examples
- **769 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/digital-signatures/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/digital-signatures/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/digital-signatures/llms-full.txt

---

A WPF application signs a PDF document when it saves it: [SaveSettings.DigitalSignature](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/digitalsignature-property/llms-full.txt) signs the whole document, and [SaveSettings.SignatureFields](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/savesettings/signaturefields-property/llms-full.txt) signs individual signature fields. No sample of Text Control is a WPF application that signs documents, but the calls are the same in every .NET product of TX Text Control, so the console sample and the articles below apply directly.

### Sample Project

| Example | What it shows | Where |
|---|---|---|
| Signing in a console application | A whole document and a [SignatureField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/signaturefield/llms-full.txt) signed with the certificate of a PFX file, as described in [Digitally Signing Adobe PDF Documents](https://www.textcontrol.com/blog/2022/09/15/digitally-signing-adobe-pdf-documents/). A console application for TX Text Control .NET Server: .NET 8, version 33.0, C# | [TextControl.Core.CommandLine.Signing](https://github.com/TextControl/TextControl.Core.CommandLine.Signing) |

To use its code in a WPF project, reference `TXTextControl.TextControl.WPF.SDK` instead of the package of TX Text Control .NET Server, and save from the `TextControl` of your window or from a `ServerTextControl`. [PDF Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/pdf/llms-full.txt) lists a sample that signs a PDF document to protect its watermark.

### Blog Articles With Code

These articles use `ServerTextControl` and the class [DigitalSignature](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/digitalsignature/llms-full.txt), which are part of TX Text Control .NET for WPF as well:

| Example | What it shows | Where |
|---|---|---|
| Document or signature fields | The difference between signing a whole PDF document and signing its signature fields | [Understanding the Differences: Signing a PDF Document vs. Signing Signature Fields in a PDF in C#](https://www.textcontrol.com/blog/2024/10/08/signing-a-pdf-document-vs-signing-signature-fields-in-a-pdf-in-csharp/) |
| Smart card certificates | A certificate picked by the user from the Windows certificate store, for example on a smart card, and used to sign | [Signing PDF Documents with Smart Card Certificates in C#](https://www.textcontrol.com/blog/2021/08/19/signing-pdf-documents-with-smart-card-certificates-in-csharp/) |
| Test certificates | A self-signed certificate created on Windows and used to sign PDF documents | [How to Create Self-Signed Certificates on Windows to Sign PDFs in .NET C#](https://www.textcontrol.com/blog/2025/02/28/how-to-create-self-signed-certificates-on-windows-to-sign-pdfs-in-net-c-sharp/) |
| A digital ID from Acrobat Reader | A self-signed digital ID created in Adobe Acrobat Reader and used to sign | [Sign Documents with a Self-Signed Digital ID From Adobe Acrobat Reader in .NET C#](https://www.textcontrol.com/blog/2024/08/12/sign-documents-with-a-self-signed-digital-id-from-adobe-acrobat-reader-in-net-c-sharp/) |
| Trusted timestamps | Signatures that carry a timestamp from a timestamp server | [Building Long-Term Trust with Digital Signatures and Timestamps in C# .NET](https://www.textcontrol.com/blog/2026/08/04/building-long-term-trust-with-digital-signatures-and-timestamps-in-c-sharp-dot-net/) |

### Next Steps

- [Digital Signatures](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/digital-signatures/llms-full.txt): signatures, certificates, signature fields and timestamps, explained.
- [Digitally Sign a PDF](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/sign/llms-full.txt): sign a first document from a window.
- [PDF Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/pdf/llms-full.txt): create and process PDF documents.

---

## Nearby

- **Previous:** [PDF Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/pdf/llms-full.txt)
- **Next:** [What's New](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/whats-new/llms-full.txt)
