Skip to main content
Box

DocumentLayout.GetFormattedPageCount() Method

Obtains a number of pages for which layout has been already calculated.

Namespace: DevExpress.XtraRichEdit.API.Layout

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public int GetFormattedPageCount()

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, because they are formatted asynchronously.

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.

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.

See Also