# PDF Processing

> Write and read PDF in WPF applications with the TextControl: conversion, PDF import, PDF/A, fonts, forms, attachments, text extraction, metadata and passwords.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > PDF Processing
- **1079 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/llms-full.txt

---

If your WPF application hands documents to customers, archives or other systems, it most likely hands them out as PDF, and it receives PDF files in return: filled forms, e-invoices, signed contracts. TX Text Control .NET for WPF writes the document of its `TextControl` as PDF with its own filter, loads PDF files back into the editor and reads their text, form values, attachments and metadata, with no Adobe Acrobat installation. Read on for what comes after the first PDF: conversion options and the limits of the import, PDF/A, fonts, forms, attachments, text extraction, metadata and passwords.

For a first PDF, a first PDF form and a first signed PDF, work through [Getting Started: PDF Processing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/llms-full.txt). Signing in depth is the subject of [Digital Signatures](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/digital-signatures/llms-full.txt).

### How TX Text Control Handles PDF

The same document engine writes and reads PDF:

- **Saving.** `Save` of the WPF `TextControl` with `StreamType.AdobePDF` writes the document of the editor, laid out in pages; `StreamType.AdobePDFA` writes PDF/A for archives. Links, form fields and headers and footers are part of the result, and since version 34.0, each PDF contains the tagged structure of an accessible document. A `ServerTextControl` saves documents that the window doesn't show.
- **Loading.** `Load` with `StreamType.AdobePDF` turns a PDF into a document that TX Text Control reconstructs from the pages, with their layout or, depending on the import settings, as text only. PDF/A can be saved, not loaded as a format of its own.
- **Reading without the editor.** Classes of the `TXTextControl.DocumentServer.PDF` namespaces read the text lines, the form field values and the attachments of a PDF file.
- **User interface.** The **Save As** dialog has an option for a PDF password, and the DocumentSettings panel of the WPF `Sidebar` lets users edit the document properties and attachments of the PDF.

PDF options are properties of `SaveSettings` and `LoadSettings`, passed to `Save` and `Load`. The Professional and Enterprise editions include PDF export and import, and the Enterprise edition adds PDF/A, PDF/UA and form fields; see [Editions and Feature Availability](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/overview/editions/llms-full.txt).

### Find the Right Page

| If you want to | Read |
|---|---|
| Decide what a PDF contains, run JavaScript when it opens, create and validate an accessible PDF, add a watermark or convert documents | [PDF Creation and Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/creation-conversion/llms-full.txt) |
| Open PDF files in the editor or convert them to DOCX, and learn what the import can't rebuild | [PDF Import and Its Limitations](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/import/llms-full.txt) |
| Save documents for long-term archiving and electronic invoicing | [PDF/A](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/pdf-a/llms-full.txt) |
| Decide which fonts a PDF uses and what replaces a missing font | [Font Embedding and Substitution](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/fonts/llms-full.txt) |
| Create fillable forms, read what users entered or flatten a form | [PDF Forms](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/llms-full.txt) |
| Embed files such as e-invoice XML, let users manage them and extract them | [Attachments](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/attachments/llms-full.txt) |
| Show the text of a PDF, search it with regular expressions or read a value at a position | [Text Extraction](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/text-extraction/llms-full.txt) |
| Set and read title, author, keywords and custom properties, or let users edit them | [Document Metadata](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/metadata/llms-full.txt) |
| Protect a PDF with passwords and permissions, or open a protected one | [Passwords and Access Permissions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/passwords/llms-full.txt) |
| Sign a PDF with a certificate | [Digital Signatures](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/digital-signatures/llms-full.txt) |

### Where to Start

1. [Getting Started: PDF Processing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/pdf/llms-full.txt), if your application hasn't saved a PDF yet.
2. [PDF Creation and Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/creation-conversion/llms-full.txt), for what a PDF takes over from the document and the options of the save.
3. [PDF/A](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/pdf-a/llms-full.txt) and [Font Embedding and Substitution](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/fonts/llms-full.txt), if documents are archived or must look identical on every computer.
4. [PDF Import and Its Limitations](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/import/llms-full.txt), before users rely on editing any PDF they open.

### Related Sections

- [Digital Signatures](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/digital-signatures/llms-full.txt): signatures, timestamps and signature fields in PDF documents.
- [Document Processing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/document-processing/llms-full.txt): build and change documents before saving them as PDF.
- [Mail Merge and Reporting](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/mail-merge/llms-full.txt): PDF documents from templates and data.
- [PDF Passwords and Permissions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/security/pdf-passwords/llms-full.txt): what passwords and permissions protect.
- [PDF Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/examples/pdf/llms-full.txt): sample applications that create and process PDF documents.

---

## In This Section

- [Attachments](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/attachments/llms-full.txt): Attach XML, JSON or CSV to PDF and PDF/A-3 from a WPF TextControl with EmbeddedFile, edit them in the WPF Sidebar and read them with Attachments.GetFromFile.
- [PDF Creation and Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/creation-conversion/llms-full.txt): Create PDF documents from a WPF TextControl: SaveSettings, document-level JavaScript, PDF/UA descriptions and validation, SVG watermarks and letter pages.
- [Font Embedding and Substitution](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/fonts/llms-full.txt): Choose the fonts of PDF files in WPF: restrict them with FontSettings, pick replacements in the AdaptFont event and embed fonts for PDF/A.
- [PDF Forms](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/forms/llms-full.txt): Build fillable PDF forms in WPF: form fields of the TextControl become AcroForm fields, filled values come back through GetAcroFormFields, then flattening.
- [PDF Import and Its Limitations](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/import/llms-full.txt): Import PDF documents into a WPF TextControl: PDFImportSettings values, first-page previews, PDF to DOCX conversion, scanned pages and supported encryption.
- [Document Metadata](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/metadata/llms-full.txt): Update PDF metadata in a WPF app: what a PDF stores, new keywords for an existing file, a JSON index of PDFs with ServerTextControl and a PDF/UA title check.
- [Passwords and Access Permissions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/passwords/llms-full.txt): Protect PDF files from a WPF TextControl with user and master passwords, access permissions and the Save As dialog, and open protected PDFs with a PasswordBox.
- [PDF/A](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/pdf-a/llms-full.txt): Archive WPF documents as PDF/A-3a with StreamType.AdobePDFA: embeddable fonts, AdaptFont logging, PDF/A rules, folder conversion and checking in Acrobat.
- [Text Extraction](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/text-extraction/llms-full.txt): Get the text of PDF files in WPF: open it as plain text in the TextControl, read lines by page with the Lines class, match regular expressions and read areas.

---

## Nearby

- **Previous:** [Merge Events](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/mail-merge/events/llms-full.txt)
- **Next:** [PDF Creation and Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/pdf/creation-conversion/llms-full.txt)
