Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfDocumentFacade.Pages Property

Returns all PDF page properties.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Core

#Declaration

public IReadOnlyList<PdfPageFacade> Pages { get; }

#Property Value

Type Description
IReadOnlyList<PdfPageFacade>

A list of objects that contain page properties.

#Remarks

The PdfDocumentFacade.Pages property returns a list of PdfPageFacade objects used to organize PDF pages without access to their inner structure. Call the PdfPageFacade.FlattenAnnotations method to flatten 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");
}
See Also