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.v20.2.dll


public void EnsureVisibility(
    PdfDocumentPosition documentPosition
Public Sub EnsureVisibility(
    documentPosition As PdfDocumentPosition


Name Type Description
documentPosition PdfDocumentPosition

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


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