TX Text Control .NET Server

PDF Examples

Topic

From a first PDF built in code to an electronic invoice with embedded XML, the PDF examples follow the tasks of PDF processing: creating documents from code and HTML, creating and reading forms, protecting documents and checking them for accessibility. The online demos run each task on the current version; the sample projects are applications and classes that you can take further.

Online Demos

ExampleWhat it showsWhere
PDF from codeA PDF document built from scratch with ServerTextControlCreate PDFs Programmatically
PDF from HTMLHTML markup converted into a paginated PDF documentCreate PDFs from HTML
ZUGFeRD invoiceA PDF/A invoice with the invoice data embedded as XMLCreate a ZUGFeRD Invoice
Document propertiesTitle, author, subject and keywords added to the PDFSet PDF Document Properties
Fillable formsA form template filled with data and saved as an interactive or a flattened PDFCreate Fillable PDF Forms
Merging form fieldsForm fields preselected with data or replaced by the merged textMerge PDF Form Fields
Form dataThe values of completed AcroForm fields read on the serverExtract PDF Form Data
EncryptionA PDF protected with passwords and access permissionsEncrypt PDF Documents

CSV to PDF is listed in Document Processing Examples, the PDF.js demos of the viewer in Document Viewer Examples and the signing demo in Digital Signature Examples.

Sample Projects

ExampleWhat it showsWhere
Fillable PDF from an HTML formThe form fields of a template turned into an HTML form, and the submitted values merged into the template and saved as PDF, as described in Create Fillable PDFs from HTML Forms in C# ASP.NET Core Using a WYSIWYG Template. .NET 10, version 34.0TXTextControl.FormsToPDF
Watermarks per downloadA watermark with data of the user added at each download, and the PDF signed so that its removal is detectable, as described in Secure by Design: Dynamic Watermarking for Enterprise Documents in C# .NET. .NET 10, version 34.0TXTextControl.TXEnterpriseWatermark
Extracted text in PDF.jsThe text lines of a PDF extracted on the server and shown as overlays in a PDF.js viewer, as described in Visualizing Extracted PDF Content in a PDF.js Viewer Using TX Text Control in C# ASP.NET Core. Version 34.0TXTextControl.PDF.PDFJS
XFDFA class that exports the AcroForm fields of a PDF as XFDF and preselects form fields from XFDF, as described in Export and Import Adobe PDF XFDF XML Files in .NET C#. The repository contains the class onlyXfdfProcessing
HTML forms from PDF formsThe AcroForm fields of a PDF turned into HTML form elements, as described in Auto-Generate HTML Forms from PDF AcroForms in C#. Version 33.0 with the Classic engineTextControl.Web.MVC.Core.PDFForms

Electronic Invoice Samples

The samples below work with invoices in the ZUGFeRD, Factur-X and XRechnung formats: a PDF/A-3 document with the invoice data embedded as XML. They were written for earlier versions of TX Text Control and of the ZUGFeRD standard:

ExampleWhat it showsWhere
ZUGFeRD 2.3An XRechnung invoice in the ZUGFeRD 2.3 format embedded in a PDF/A-3 document, as described in Creating ZUGFeRD 2.3 (XRechnung, Factur-X) Documents with .NET C#. Version 32.0 with the Classic engineTXTextControl.ZUGFeRD23
Readable view of e-invoicesXRechnung, ZUGFeRD and Factur-X data shown as a readable document, as described in Visualize and Preview XRechnung, ZUGFeRD, and Factur-X Documents in .NET C#. Version 32.0 with the Classic engineTXTextControl.XRechnung.Visualize
Invoices from a mergeXRechnung and ZUGFeRD invoices whose XML comes from the open-source ZUGFeRD-csharp library and whose readable part is created with MailMerge, as described in Creating Valid XRechnung / ZUGFeRD Invoices with ASP.NET Core C#. Version 33.0 with the Classic engineTXTextControl.InvoiceGenerator

Electronic Invoices in PDF/A and Attachments describe the current code.

Blog Articles With Code

ExampleWhat it showsWhere
PDF/UA validationPDF documents checked for PDF/UA with TXTextControl.PDF.Validation, with JSON reportsValidating PDF/UA Documents in .NET C#: A Practical Guide
PDF/UA preflightA document checked for the requirements of PDF/UA before it's savedPreflighting PDF/UA Documents with TX Text Control in .NET C#
PDF/A for archivingOffice documents converted to PDF/A in a .NET console application on LinuxFrom DOCX to Long-Term Archiving: Generating PDF/A from Office Documents in .NET C#
PDF on LinuxPDF and PDF/A documents created in .NET on LinuxHow to Create PDF Documents with TX Text Control using C# .NET on Linux
Forms from DOCX templatesDOCX form templates filled, flattened and exported to PDFProgrammatically Fill, Flatten, and Export DOCX Form Templates to PDF in C# .NET
Form fieldsPDF form fields created, preselected, flattened and extractedCreate, Pre-Select, Flatten and Extract PDF Form Fields using C#
Encryption and permissionsPasswords and access permissions of PDF documentsPDF Security for C# Developers: Encryption and Permissions in .NET
WatermarksAn SVG watermark added to every page through a headerAdding Watermarks to PDF Documents in .NET C#
KeywordsKeywords written to and read from PDF documents for searchEnhancing PDF Searchability in Large Repositories by Adding and Reading Keywords Using C# .NET

Next Steps