PDF Processing
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. Signing in depth is the subject of Digital Signatures.
How TX Text Control Handles PDF
The same document engine writes and reads PDF:
- Saving.
Saveof the WPFTextControlwithStreamType.AdobePDFwrites the document of the editor, laid out in pages;StreamType.AdobePDFAwrites 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. AServerTextControlsaves documents that the window doesn't show. - Loading.
LoadwithStreamType.AdobePDFturns 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.PDFnamespaces 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
Sidebarlets 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.
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 |
| Open PDF files in the editor or convert them to DOCX, and learn what the import can't rebuild | PDF Import and Its Limitations |
| Save documents for long-term archiving and electronic invoicing | PDF/A |
| Decide which fonts a PDF uses and what replaces a missing font | Font Embedding and Substitution |
| Create fillable forms, read what users entered or flatten a form | PDF Forms |
| Embed files such as e-invoice XML, let users manage them and extract them | Attachments |
| Show the text of a PDF, search it with regular expressions or read a value at a position | Text Extraction |
| Set and read title, author, keywords and custom properties, or let users edit them | Document Metadata |
| Protect a PDF with passwords and permissions, or open a protected one | Passwords and Access Permissions |
| Sign a PDF with a certificate | Digital Signatures |
Where to Start
- Getting Started: PDF Processing, if your application hasn't saved a PDF yet.
- PDF Creation and Conversion, for what a PDF takes over from the document and the options of the save.
- PDF/A and Font Embedding and Substitution, if documents are archived or must look identical on every computer.
- PDF Import and Its Limitations, before users rely on editing any PDF they open.