# PDF Examples

> PDF samples for TX Text Control .NET for Windows Forms: ZUGFeRD invoices, a PDF viewer in a form, fillable forms, form fields, attachments and encryption.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Examples > PDF Examples
- **1244 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/pdf/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/pdf/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/pdf/llms-full.txt

---

A Windows Forms application saves PDF documents from the same `TextControl` that users edit, and the PDF classes of TX Text Control read form fields, attachments and text from existing PDF files. Few samples are Windows Forms projects: an electronic invoice and a PDF viewer. The other samples and articles below were written for TX Text Control .NET Server or as console applications, and use classes that TX Text Control .NET for Windows Forms contains as well.

### Windows Forms Samples

| Example | What it shows | Where |
|---|---|---|
| ZUGFeRD invoice | An invoice saved from the `TextControl` as PDF/A with its ZUGFeRD XML embedded as an [EmbeddedFile](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/llms-full.txt), as described in [Creating ZUGFeRD Compliant PDF Invoices in C#](https://www.textcontrol.com/blog/2021/02/03/creating-zugferd-compliant-pdf-invoices-in-csharp/). .NET Framework 4.8, version 33.0, C# | [TextControl.WindowsForms.Zugferd](https://github.com/TextControl/TextControl.WindowsForms.Zugferd) |
| PDF viewer in a form | The Document Viewer of TX Text Control .NET Server in a `WebView2` control, served by a web server inside the Windows Forms application, as described in [Display PDF Documents in Windows Forms using the Document Viewer and Embedded Kestrel in C#](https://www.textcontrol.com/blog/2023/10/13/display-pdf-documents-in-windows-forms-using-the-document-viewer-and-embedded-kestrel-in-csharp/). .NET 8, version 33.0, with the packages `TXTextControl.TextControl.Core.SDK` and `TXTextControl.Web.DocumentViewer` of TX Text Control .NET Server, C# | [TXTextControl.Windows.Forms.TXViewer](https://github.com/TextControl/TXTextControl.Windows.Forms.TXViewer) |

### Other Samples

These projects are console applications for TX Text Control .NET Server. Their code runs in a Windows Forms project once you replace the package with `TXTextControl.TextControl.WinForms.SDK`:

| Example | What it shows | Where |
|---|---|---|
| ZUGFeRD from a merge | An invoice merged with `MailMerge`, its XML created with a ZUGFeRD library and embedded in a PDF/A document, as described in [Creating 100% Compliant ZUGFeRD and Factur-X Invoices using MailMerge in C#](https://www.textcontrol.com/blog/2023/02/09/creating-compliant-zugferd-and-facturx-invoices-using-mailmerge-in-csharp/). .NET 8, version 33.0 | [TXTextControl.Core.MailMerge.Zugferd](https://github.com/TextControl/TXTextControl.Core.MailMerge.Zugferd) |
| Form fields mapped to JSON | The form fields of a template renamed to match the keys of JSON data, as described in [Automatically Mapping TX Text Control Form Fields to JSON Data in .NET C#](https://www.textcontrol.com/blog/2026/06/03/automatically-mapping-tx-text-control-form-fields-to-json-data-in-dotnet-csharp/). .NET 10, version 34.0 | [TXTextControl.FormFieldMapper](https://github.com/TextControl/TXTextControl.FormFieldMapper) |

### Blog Articles With Code

These articles use `ServerTextControl` and the PDF classes, which are part of TX Text Control .NET for Windows Forms as well:

| Example | What it shows | Where |
|---|---|---|
| Fillable PDF forms | Text, check box and selection form fields created and saved as a fillable PDF form | [Create Fillable PDF Forms in .NET C#](https://www.textcontrol.com/blog/2024/11/12/create-fillable-pdf-forms-in-net-c-sharp/) |
| Form fields in PDF | Form fields created, preselected, flattened and read from a PDF document | [Create, Pre-Select, Flatten and Extract PDF Form Fields using C#](https://www.textcontrol.com/blog/2023/08/14/create-preselect-flatten-and-extract-pdf-form-fields-using-csharp/) |
| Flattened form fields | Form fields turned into static text before saving as PDF | [Extension Method: Flatten Forms Fields in PDF Documents using .NET C#](https://www.textcontrol.com/blog/2024/07/17/flatten-forms-fields-in-pdf-documents-using-net-c-sharp/) |
| DOCX forms to PDF | A DOCX document with form fields converted to PDF, with the fields kept or flattened | [Convert MS Word DOCX to PDF with Form Fields in C# .NET: Preserve or Flatten Form Fields](https://www.textcontrol.com/blog/2025/02/26/convert-ms-word-docx-to-pdf-with-form-fields-in-csharp-dotnet/) |
| Form field formats | AcroForms, the legacy form fields of MS Word and content controls compared | [Form Field Compatibility: Work with AcroForms, Legacy MS Word Forms, and Content Controls](https://www.textcontrol.com/blog/2024/04/04/form-fields-working-with-acroforms-legacy-ms-word-forms-and-content-controls/) |
| ZUGFeRD attachments | The XML attachment of a ZUGFeRD or Factur-X invoice read from a PDF/A-3 document | [Extract ZUGFeRD/Factur-X XML Attachments from Adobe PDF/A-3b Documents](https://www.textcontrol.com/blog/2021/01/18/extract-zugferd-facturx-attachments-from-adobe-pdf-documents/) |
| PDF to text | The text of a PDF document saved as plain text | [Converting PDF Documents to Plain Text TXT in C#](https://www.textcontrol.com/blog/2023/11/16/converting-pdf-documents-to-plain-text-txt-in-csharp/) |
| Encryption and permissions | Passwords and access permissions of a PDF document | [PDF Security for C# Developers: Encryption and Permissions in .NET](https://www.textcontrol.com/blog/2025/06/16/pdf-security-for-csharp-developers-encryption-and-permissions-in-dotnet/) |
| Keywords | Keywords written to and read from the metadata of PDF documents | [Enhancing PDF Searchability in Large Repositories by Adding and Reading Keywords Using C# .NET](https://www.textcontrol.com/blog/2025/06/24/enhancing-pdf-searchability-in-large-repositories-by-adding-and-reading-keywords-using-csharp-dotnet/) |

### Next Steps

- [PDF Processing](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/pdf/llms-full.txt): create, import and secure PDF documents.
- [Create a PDF](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/pdf/create/llms-full.txt): save a first PDF document from a form.
- [Digital Signature Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/digital-signatures/llms-full.txt): sign PDF documents with certificates.

---

## Nearby

- **Previous:** [Mail Merge Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/mail-merge/llms-full.txt)
- **Next:** [Digital Signature Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/examples/digital-signatures/llms-full.txt)
