officefileapi-devexpress-dot-pdf-dot-pdfdocumentfacade-7517fbf6.md
Returns all PDF page properties.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public IReadOnlyList<PdfPageFacade> Pages { get; }
Public ReadOnly Property Pages As IReadOnlyList(Of PdfPageFacade)
| Type | Description |
|---|---|
| IReadOnlyList<PdfPageFacade> |
A list of objects that contain page properties.
|
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");
}
Using processor As New PdfDocumentProcessor()
' Load a document:
processor.LoadDocument("..\..\Document.pdf")
' Flatten annotations located
' on the lower half of the page:
Dim pageFacade As PdfPageFacade = documentFacade.Pages(0)
Dim halfPage As Double = processor.Document.Pages(0).CropBox.Top / 2
pageFacade.FlattenAnnotations(Function(x) x.Rectangle.Top < halfPage)
' Save the result:
processor.SaveDocument("..\..\Result.pdf")
End Using
The following code snippets (auto-collected from DevExpress Examples) contain references to the Pages property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
pdf-document-api-add-link-to-page/CS/AddLinkToPage/Program.cs#L14
// Access third page properties
PdfPageFacade pageFacade = pdfDocumentProcessor.DocumentFacade.Pages[2];
pdf-document-api-add-link-to-uri/CS/AddLinkToUri/Program.cs#L16
// Access the first page properties
PdfPageFacade page = processor.DocumentFacade.Pages[0];
pdf-document-api-highlight-search-results/CS/HighlightSearchResults/Program.cs#L63
PdfDocumentFacade facade = processor.DocumentFacade;
PdfPageFacade page = facade.Pages[result.Page.GetPageIndex()];
pdf-document-api-add-link-to-page/VB/AddLinkToPage/Program.vb#L14
' Access third page properties
Dim pageFacade As PdfPageFacade = processor.DocumentFacade.Pages(2)
pdf-document-api-add-link-to-uri/VB/AddLinkToUri/Program.vb#L15
' Access the first page properties
Dim page As PdfPageFacade = processor.DocumentFacade.Pages(0)
pdf-document-api-highlight-search-results/VB/HighlightSearchResults/Program.vb#L54
Dim facade As PdfDocumentFacade = processor.DocumentFacade
Dim page As PdfPageFacade = facade.Pages(result.Page.GetPageIndex())
See Also