TN12: Flatten form data using the Amyuni PDF Creator API

This forum contains a list of all our Technical Notes. These provide developers with sample applications and information on using our products.
Post Reply
Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

TN12: Flatten form data using the Amyuni PDF Creator API

Post by Jose » Tue Sep 04 2012

Using the Amyuni PDF Creator API to flatten form field data on a PDF document.

A typical PDF document workflow usually involves users filling out a PDF document that contains form field data and passing the filled out PDF document to another user. This other user typically reviews the document and adds their comments.

The problem arises that at the end of this workflow, the PDF document can be stored in a secure location but the data stored on the PDF document can be changed or modified.

“Flattening” the PDF document is actually a solution that can be easily implemented by both the Amyuni PDF Creator ActiveX or .NET library products.

Form fields (and other PDF objects such as comments) expose an “annotation” attribute. An annotation associates an object such as a note, field, or text with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard.

Using the Amyuni PDF Creator ActiveX or .NET library, you simply need to loop through the PDF document and set the “annotation” attribute to “false” for the particular PDF object. What this actually does is disables the object’s ability to interact with the mouse or keyboard.

Also, the benefit of using this technique is that this process if reversible. You simply need to turn the “annotation” attribute back to “true” in order to be able to access the PDF objects.

This complete technical note including code snippets is available from the link below:
http://www.amyuni.com/downloads/tn12.pdf

If you wish to test the solution further, we suggest that you download evaluation versions of our Amyuni PDF Creator products.

ActiveX
http://www.amyuni.com/en/developer/pdfcreatoractivex

.NET
http://www.amyuni.com/en/developer/pdfcreator
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

Post Reply