PDF Processing
Invoices sent to customers, contracts kept in an archive for decades, forms that come back filled in: many documents leave an application as PDF, and many arrive as PDF. TX Text Control .NET Server creates, converts and reads PDF documents on the server with ServerTextControl, without Adobe Acrobat or another PDF library. Beyond a first PDF, the tasks range from passwords and fonts to the PDF/A and PDF/UA standards, forms, attachments, metadata, watermarks, text extraction and validation.
The first PDF, an imported PDF and a signed PDF are built step by step in Getting Started: PDF Processing. Signing is described in depth in Digital Signatures.
How TX Text Control Handles PDF
PDF is an output and an input format of the same document engine:
- Saving. A document that you create, load or merge is laid out in pages and saved with
StreamType.AdobePDF, or withStreamType.AdobePDFAfor archiving. Links, form fields and headers and footers become part of the PDF, and since version 34.0, every PDF carries the tagged structure that accessible documents need. - Loading. A PDF loaded with
StreamType.AdobePDFbecomes a document that TX Text Control reconstructs from the pages. Your code reads its text with positions, its metadata, its form field values and its embedded files. PDF/A is a format for saving only. - Where it runs. Text Control builds the PDF export itself. With the Core package
TXTextControl.TextControl.Core.SDK, creating PDF documents works on Windows and Linux.
The settings for PDF documents are properties of SaveSettings and LoadSettings, which you pass to Save and Load. The elements of a document that end up in the PDF, such as tables, images or headers and footers, are described in Document Processing.
Find the Right Page
| If you want to | Read |
|---|---|
| Protect a PDF with passwords and permissions, run JavaScript when it opens or control its fonts | PDF Creation |
| Convert DOCX, HTML, XLSX or Markdown to PDF, or PDF documents to editable formats | PDF Conversion |
| Create documents for long-term archiving and electronic invoices | PDF/A |
| Give a PDF a title, headings and descriptions for screen readers | PDF/UA |
| Create interactive forms, import and export their data or flatten them | PDF Forms |
| Embed files such as the XML of an electronic invoice and extract them again | Attachments |
| Read the text of a PDF page by page, search it or read a value from an area of a page | Text Extraction |
| Write and read the title, author, keywords and custom properties | Document Metadata |
| Put "DRAFT" or "CONFIDENTIAL" behind the text of every page | Watermarks |
| Check PDF documents against PDF/UA and stop documents that fail | PDF Validation |
| Sign PDF documents with a certificate | Digital Signatures |
Where to Start
- Getting Started: PDF Processing: a first PDF, if you haven't created one with TX Text Control yet.
- PDF Creation: what a PDF keeps from the document and how you protect it.
- PDF/A or PDF/UA, when your documents must meet a standard. A document can comply with both.
- PDF Validation: check the result before the documents leave your application.