PDF/A-3b allows the storage of attachments in PDF documents. With TX Text Control X19, you will be able to import and export those attachments from and to PDF documents. Typically, this is used to store machine-readable data as an attachment to the human-readable PDF version.

Document Revisions

But there many other applications for this powerful feature. Consider a PDF document that contains the most current version of a document as a PDF representation that can be read by any standard PDF viewer such as Adobe Acrobat Reader or browser readers such as PDF.js.

In addition to this "printable" version of the document, document revisions are stored in an editable format as attachments.

Creating documents with TX Text Control

The following code shows a sample implementation of such a VersionedDocument class:

Loading...

In a sample Windows Forms application, in the constructor, VersionedDocument is connected to a TextControl TX Text Control .NET for Windows Forms
TXTextControl Namespace
TextControl Class
The TextControl class implements a Windows Forms control with high-level text editing features.
class.

Loading...

The sample form consists of two Text Control instances, a button to save a revision, a button to load an existing document and a drop-down box that lists all embedded revisions:

Sample implementation

Saving the Document

In a first step, a first version of the document is created and saved as a revision in the document test.pdf by clicking the button Save Revision:

Sample implementation

The code behind the first button click is shown in the following code gist:

Loading...

In a second step, the document in the left side Text Control is modified and saved as a new revision by clicking Save Revision:

Sample implementation

The drop-down box shows now two embedded revisions and by changing the selected index, the selected revision can be loaded separately into the second Text Control on the right side:

Loading...

Loading the Visual Representation

When loading an existing document, the newest version is loaded into the connected Text Control:

Loading...

If this created document repository is opened in Adobe Acrobat Reader, the most current version is displayed as the PDF representation and the embedded revisions are shown in the list of attachments:

Adobe PDF

This is just another innovative idea from Text Control to integrate electronic document processing into business workflows. Stay tuned for more features of TX Text Control X19!