DocumentLayout.GetFormattedPageCount() Method
Obtains a number of pages for which layout has been already calculated.
Namespace: DevExpress.XtraRichEdit.API.Layout
Assembly: DevExpress.RichEdit.v25.1.Core.dll
NuGet Package: DevExpress.RichEdit.Core
Declaration
Returns
Type | Description |
---|---|
Int32 | An integer that is the number of pages in the document layout. |
Remarks
Use the GetFormattedPageCount
value to get the actual number of formatted pages. The pages are formatted asynchronously.
Handle the DocumentLayout.DocumentFormatted event and call the GetFormattedPageCount
method to retrieve a more accurate number of pages.
The document layout in RichEditDocumentServer is calculated on demand (the RichEditDocumentServer.LayoutCalculationMode property is set to Manual), so the GetFormattedPageCount
method returns 0
after the document is loaded.
You can use the DocumentLayout.GetPageCount() method to retrieve the number of pages in the document.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetFormattedPageCount() method.
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.