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

PdfPageFacade Class

Exposes a set of methods used to perform various operations on a PDF page without access to its inner structure.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Core

Declaration

public class PdfPageFacade

Remarks

The PdfDocumentFacade.Pages property returns a list of objects used to organize the PDF page without access to its inner structure. Call the PdfPageFacade.FlattenAnnotations() method to flatten the page annotations.

The code sample below flattens all annotations that are located on the lower half of the page:

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

  // Flatten annotations located
  // on the lower half of the page:
  PdfPageFacade pageFacade = documentFacade.Pages[0];

  double halfPage = processor.Document.Pages[0].CropBox.Top / 2;
  pageFacade.FlattenAnnotations(x => x.Rectangle.Top < halfPage);

  // Save the result:
  processor.SaveDocument("..\\..\\Result.pdf");
}

You can also flatten a specific annotation. Use the PdfPageFacade.Annotations property to retrieve a list of annotation facade objects and utilize the PdfAnnotationFacade.Flatten() method.

Inheritance

Object
PdfPageFacade
See Also