Skip to main content

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.v23.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