X19 Sneak Peek: Embedded Files in Adobe PDF Documents
TX Text Control X19 will support embedded files in created PDF documents. Those attachments can be exported and imported by TX Text Control.

PDF/A-3 permits the embedding of files in any format. PDF/A-3 documents allow the progression from electronic paper to an electronic container that holds the human and machine-readable versions of a document. Applications can extract the machine-readable portion of the PDF document in order to process it. A PDF/A-3 document can contain an unlimited number of embedded documents for different processes.
Electronic Invoices
In case of the electronic invoice, a machine-readable part can be embedded (such as XML). The processing application is not specialized in reading PDF documents, but is able to extract the structured attachment, which is then processed by the commercial software that is able to read this attachment. ZUGFeRD is a specification for a format that describes electronic invoices.
Using TX Text Control X19, PDF files with attachments can be created and imported to retrieve and process embedded attachments such as electronic invoices.
Document Settings Sidebar
A new sidebar will be available to adjust typical document settings that are adjustable using the Save
The sidebar can be also used to add attachments to documents that are exported to PDF. Attachments are also listed in the sidebar when PDF documents with attachments are imported. Those attachments can be extracted and saved externally.
Embed Attachments Programmatically
By code, embedded files can be attached using the new DocumentSettings.EmbeddedFiles property that gets or sets an array of EmbeddedFile objects:
// convert PDF to byte array
byte[] baAttachment = System.IO.File.ReadAllBytes("forms.pdf");
// create a new embedded file
TXTextControl.EmbeddedFile efAttachment =
new TXTextControl.EmbeddedFile("myInvoice.pdf", baAttachment, null)
{
Description = "My embedded file."
};
// add the embedded file to TextControl
textControl1.DocumentSettings.EmbeddedFiles =
new TXTextControl.EmbeddedFile[] { efAttachment };
// save the document
textControl1.Save("mypdf.pdf", TXTextControl.StreamType.AdobePDF);
When opened in Acrobat Reader, you can see these attachments in the sidebar:
TX Text Control X19 allows you to embed any type of document attachments to created PDF files. This allows you to create PDF documents programmatically using the TX Text Control developer API and to embed any documents to these PDFs. In version X19 (29.0), TX Text Control will not only support the creation of these PDF documents, but also the import and extraction of attached documents.
The following diagram shows the supported workflows:
- The PDF/A-3 document is created using TX Text Control by merging data into an MS Word compatible template and by embedding attachments.
- A PDF/A-3 document (potentially created by a third party) is imported.
- The attachments can be extracted, stored and processed separately.
E-Invoicing
ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a specification for a format that describes electronic invoices. A ZUGFeRD invoice consists of two parts: The visual representation of an invoice that is readable by humans and machine-readable structured XML information which is attached to the PDF/A-3 document.
The advantage of such a document is that the embedded file can be easily processed by machines and the document itself can be visualized by any standard PDF reader and is therefore robustly archivable backed by the original PDF/A idea.
Stay tuned for more features of TX Text Control X19!
Jump to the other posts in this series:
- X19 Sneak Peek: Table of Contents
- X19 Sneak Peek: Embedded Files in Adobe PDF Documents
- X19 Sneak Peek: Integrated Barcode Support
- X19 Sneak Peek: Processing AcroForm Fields in Adobe PDF Documents
- X19 Sneak Peek: Storing Document Revisions in PDF/A-3b
- X19 Sneak Peek: Validating ZUGFeRD / Factur-X Invoices with TX Text Control
- X19 Sneak Peek: Changes for Keyboard Layout and Spell Checking
- X19 Sneak Peek: Manipulating MergeBlockInfo Objects
Related Posts
X19 Sneak Peek: Integrated Barcode Support
Support for 1D and 2D barcodes will be directly integrated as a feature in TX Text Control X19. No optional product will be required anymore.
X19 Sneak Peek: Table of Contents
A major new feature of TX Text Control X19 will be the support for an MS Word compatible table of contents. This article gives a sneak peek overview of this new feature.
TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5
TX Text Control 33.0 Service Pack 1 and TX Text Control 32.0 Service Pack 5 have been released, providing important updates and bug fixes across platforms. These service packs improve the…