Back to Devexpress

PdfAnnotationFacade.Flatten() Method

officefileapi-devexpress-dot-pdf-dot-pdfannotationfacade.md

latest1.6 KB
Original Source

PdfAnnotationFacade.Flatten() Method

Flattens the annotation.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public void Flatten()
vb
Public Sub Flatten

Remarks

The code sample below flattens the first annotation on the page:

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

  // Flatten the first annotation:
  var annotations = processor.DocumentFacade.Pages[0].Annotations;
  annotations[0].Flatten();

  // Save the result:
  processor.SaveDocument("..\\..\\Result.pdf");
}
vb
Using processor As New PdfDocumentProcessor()
  ' Load a document:
  processor.LoadDocument("..\..\Document.pdf")

  ' Flatten the first annotation:
  Dim annotations = processor.DocumentFacade.Pages(0).Annotations
  annotations(0).Flatten()

  ' Save the result:
  processor.SaveDocument("..\..\Result.pdf")
End Using

See Also

PdfAnnotationFacade Class

PdfAnnotationFacade Members

DevExpress.Pdf Namespace