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.
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.
The following code shows a sample implementation of such a VersionedDocument class:
In a sample Windows Forms application, in the constructor, VersionedDocument is connected to a Text
╰ TXTextControl Namespace
╰ TextControl Class
The TextControl class implements a Windows Forms control with high-level text editing features. class.
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:
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:
The code behind the first button click is shown in the following code gist:
In a second step, the document in the left side Text Control is modified and saved as a new revision by clicking Save Revision:
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 the Visual Representation
When loading an existing document, the newest version is loaded into the connected Text Control:
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:
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!