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
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002

TN12: Flatten form data using the Amyuni PDF Creator API

Post by Jose »

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:

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


Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing -
Post Reply