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 SaveSettings TX Text Control .NET for Windows Forms
TXTextControl Namespace
SaveSettings Class
The SaveSettings class provides properties for advanced settings and information during save operations.
class. This sidebar can be also used to set the Custom Properties TX Text Control .NET for Windows Forms
TXTextControl Namespace
SaveSettings Class
UserDefinedDocumentProperties Property
Sets a dictionary with all user-defined document properties which will be saved in the document.
that can be used to store additional information in documents.

Attachements Sidebar

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);
view raw test.cs hosted with ❤ by GitHub

When opened in Acrobat Reader, you can see these attachments in the sidebar:

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

Attachements Sidebar

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.

Attachements Sidebar

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!