TX Text Control .NET for WPF

PDF Processing

Topic

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. 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.

Find the Right Page

If you want toRead
Decide what a PDF contains, run JavaScript when it opens, create and validate an accessible PDF, add a watermark or convert documentsPDF Creation and Conversion
Open PDF files in the editor or convert them to DOCX, and learn what the import can't rebuildPDF Import and Its Limitations
Save documents for long-term archiving and electronic invoicingPDF/A
Decide which fonts a PDF uses and what replaces a missing fontFont Embedding and Substitution
Create fillable forms, read what users entered or flatten a formPDF Forms
Embed files such as e-invoice XML, let users manage them and extract themAttachments
Show the text of a PDF, search it with regular expressions or read a value at a positionText Extraction
Set and read title, author, keywords and custom properties, or let users edit themDocument Metadata
Protect a PDF with passwords and permissions, or open a protected onePasswords and Access Permissions
Sign a PDF with a certificateDigital Signatures

Where to Start

  1. Getting Started: PDF Processing, if your application hasn't saved a PDF yet.
  2. PDF Creation and Conversion, for what a PDF takes over from the document and the options of the save.
  3. PDF/A and Font Embedding and Substitution, if documents are archived or must look identical on every computer.
  4. PDF Import and Its Limitations, before users rely on editing any PDF they open.