Skip to main content

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

PdfViewer.EnsureVisibility(PdfDocumentPosition) Method

Tries to display the document position on the screen if the document position is found to be not visible in the PdfViewer.IsVisible method.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.dll

NuGet Package: DevExpress.Win.PdfViewer

#Declaration

public void EnsureVisibility(
    PdfDocumentPosition documentPosition
)

#Parameters

Name Type Description
documentPosition PdfDocumentPosition

A PdfDocumentPosition object that specifies a specific document’s position.

#Remarks

The EnsureVisibility method tries to display the document position at the center of the screen using the current document zoom factor. If this is not possible, the displayed position will appear within the visible document area.

If the page number of the specified document position is less than one, the displayed position will correspond to the beginning of the first page. If the specified page number exceeds the total page count, the displayed position will correspond to the end of the last page.

When calling the EnsureVisibility method with the document position being null, the ArgumentNullException will be thrown.

When you call the EnsureVisibility method before any document has been loaded, an InvalidOperationException will be thrown.

See Also