Flattening Annotations

When flattening an annotation, the annotation is removed from a document, but its visual representation is kept intact. A flattened annotation is still visible but is no longer editable by your users or by your app. This can be used, for example, to permanently apply annotations to your document or to make annotations visible to viewers that otherwise can’t show annotations (like Safari on iOS). If not specified, an export will keep all annotations as they are.

To flatten annotations when saving, there is an option in the DocumentSaveOptions class:

document.Save(new DocumentSaveOptions
    flattenAnnotations = true

Note that if you set flattenAnnotations = true in DocumentSaveOptions, the incremental property is ignored because flattening requires a full rewrite of the PDF.