Back to Devexpress

PdfViewer.ZoomMode Property

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-6670ad47.md

latest2.7 KB
Original Source

PdfViewer.ZoomMode Property

Specifies the document zoom mode.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
[DefaultValue(PdfZoomMode.ActualSize)]
public PdfZoomMode ZoomMode { get; set; }
vb
<DefaultValue(PdfZoomMode.ActualSize)>
Public Property ZoomMode As PdfZoomMode

Property Value

TypeDefaultDescription
PdfZoomModeActualSize

A PdfZoomMode enumeration value.

|

Available values:

NameDescription
Custom

The document zoom factor is defined by the PdfViewer.ZoomFactor property value.

| | ActualSize |

Sets the document zoom factor value to 100%.

| | FitToVisible |

The document zoom factor is calculated to fit to the width of the visible content of a page. The region of the visible page content is defined by the bleed box (see section 14.11.2 of the PDF 32000-1:2008 standard). If the bleed box is smaller than the crop box, the FitToWidth and FitToVisible modes provide different results.

| | FitToWidth |

Sets the document zoom factor value to fit to the width of the widest page in a document. If the bleed box is smaller than the crop box, the FitToWidth provides different result from the FitToVisible mode.

| | PageLevel |

Sets the document zoom factor value to fit to the widest or highest page in a document.

|

Remarks

csharp
private void Form1_Load(object sender, EventArgs e)
{
  this.pdfViewer.LoadDocument(@"..\..\Demo.pdf");
  this.pdfViewer.ZoomMode = DevExpress.XtraPdfViewer.PdfZoomMode.FitToWidth;
}
vb
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
    Me.pdfViewer.LoadDocument("..\..\Demo.pdf")
    Me.pdfViewer.ZoomMode = DevExpress.XtraPdfViewer.PdfZoomMode.FitToWidth
End Sub

See Also

ZoomFactor

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace