Skip to main content
A newer version of this page is available. .
All docs
V21.1
.NET Framework 4.5.2+

PdfDocumentFacade.FlattenAnnotations(PdfAnnotationType[]) Method

Flattens all document annotations with the specified type.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.1.Core.dll

NuGet Package: DevExpress.Pdf.Core

Declaration

public void FlattenAnnotations(
    params PdfAnnotationType[] types
)

Parameters

Name Type Description
types PdfAnnotationType[]

Indicates the annotation type.

Remarks

The code sample below flattens all text annotations:

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
  //Load a document:
  processor.LoadDocument("..\\..\\Document.pdf");
  PdfDocumentFacade documentFacade = processor.DocumentFacade;

  documentFacade.FlattenAnnotations(PdfAnnotationType.Text);
  //Save the result:
  processor.SaveDocument("..\\..\\Result.pdf");
}
System.Diagnostics.Process.Start("..\\..\\Result.pdf");
See Also