Some test text!

menu
Flatten annotationskeyboard_arrow_down

Flatten PDF annotations in Xamarin

To flatten annotations in a PDF document.

PDFDoc doc = new PDFDoc(filename);

// flatten all annotations
doc.FlattenAnnotations();

PDF interactive forms (AcroForms)
Full sample code which illustrates some basic PDFNet capabilities related to interactive forms (also known as AcroForms) and annotation flattening.

About annotation flattening

Annotation or form flattening refers to the operation that changes annotations (such as markup, widgets, 3D models, etc.) into a static area that is part of the PDF document, just like the other text and images in the document.

Using the Annotation.Flatten(page), it is possible to merge individual annotations with the page content. PDFTron SDK also allows you to flatten all forms in the document in a single function call, with PDFDoc.FlattenAnnotations().

Widget annotations share a relationship with forms because the display of a form field is a widget annotation. The process of flattening annotations therefore can flatten forms as well. By flattening and merging existing annotation appearances with page content, the original annotations are deleted from the PDF pages.

Note that it is not possible to undo the flatten operation. An alternative approach to annotation or form flattening is to set the annotation to e_read_only. The e_read_only flag on the annotation enables this modification.

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.