Skip to content

Commit 31b7326

Browse files
authored
Merge pull request #1205 from syncfusion-content/260501
260501 : Add UG documentation for Mangnifying pdf documents in windowsforms
2 parents b91bd36 + 891b990 commit 31b7326

3 files changed

Lines changed: 60 additions & 1 deletion

File tree

WindowsForms-toc.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3702,7 +3702,8 @@
37023702
<li><a href="/windowsforms/PDF-Viewer/Localization">Localization</a></li>
37033703
<li><a href="/windowsforms/PDF-Viewer/Working-with-themes">Working with themes</a></li>
37043704
<li><a href="/windowsforms/PDF-Viewer/Interaction-Modes">Working with Interaction Modes</a></li>
3705-
<li><a href="/windowsforms/PDF-Viewer/Interaction-Modes">Working with ErrorOccured Event</a></li>
3705+
<li><a href="/windowsforms/PDF-Viewer/ErrorOccured Event">Working with ErrorOccured Event</a></li>
3706+
<li><a href="/windowsforms/PDF-Viewer/Magnifying-pdf-documents">Magnifying PDF documents</a></li>
37063707
<li>
37073708
How To
37083709
<ul>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: post
3+
title: Magnifying PDF documents in WinForms Pdf Viewer control | Syncfusion<sup>&reg;</sup>;
4+
description: Learn about Magnifying PDF documents support in Syncfusion<sup>&reg;</sup>;WinForms Pdf Viewer control, its elements and more.
5+
platform: WinForms
6+
control: PDF Viewer
7+
documentation: ug
8+
---
9+
10+
# Adjust the magnification of PDF documents using the WinForms PDF Viewer
11+
12+
The WinForms PDF Viewer has predefined set of zoom tools in the built-in toolbar, that allows you to change magnifications of the PDF document that is being displayed.
13+
14+
![Zoom tools of WinForms PDF Viewer](images/zoom tools.png)
15+
16+
1. **Combo box**: It allows you to select a zoom percentage from the pre-defined set of values listed in the dropdown. Since it is editable, you can also provide your zoom values by double editing the text area.
17+
2. **Zoom out button**: It allows you to reduce the zoom value by 25% from the current zoom percentage.
18+
3. **Zoom in button**: It allows you to increase the zoom value by 25% from the current zoom percentage.
19+
4. **Fit to width button**: It allows you to fit the document to the width of the control.
20+
5. **Fit to page button**: It allows you to fit a whole page in the window and to view only one page at a time.
21+
22+
### Magnify the document to a given zoom percentage
23+
24+
You can magnify the document to a given zoom percentage by using the [ZoomTo](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_Forms_PdfViewer_PdfViewerControl_ZoomTo_System_Int32_) function of the PDF Viewer. Refer to the following code sample to apply the specific zoom percentage based on the page contents.
25+
26+
{% tabs %}
27+
{% highlight c# %}
28+
//Zoom to 235 percentage.
29+
pdfViewer.ZoomTo(235);
30+
{% endhighlight %}
31+
{% endtabs %}
32+
33+
The [ZoomPercentage](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_Forms_PdfViewer_PdfViewerControl_ZoomPercentage) property can be used to get the control's current zoom percentage.
34+
35+
{% tabs %}
36+
{% highlight c# %}
37+
//Get the current zoom percentage.
38+
int currentZoomPercentage = pdfViewer.ZoomPercentage;
39+
{% endhighlight %}
40+
{% endtabs %}
41+
42+
## Zoom modes
43+
44+
As stated above, the PDF Viewer supports the fit to page and fit to width zoom modes. You can change the zoom mode, using the [ZoomMode](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_Forms_PdfViewer_PdfViewerControl_ZoomMode) property of the PDF Viewer. Refer to the following code sample to change the zoom mode.
45+
46+
{% tabs %}
47+
{% highlight c# %}
48+
//To apply fit-to-page zoom mode.
49+
pdfViewer.ZoomMode = ZoomMode.FitPage;
50+
// To apply fit-to-width zoom mode.
51+
pdfViewer.ZoomMode = ZoomMode.FitWidth;
52+
{% endhighlight %}
53+
{% endtabs %}
54+
55+
## Mouse and keyboard shortcuts
56+
57+
**Ctrl (key) + Scroll the mouse wheel up** - To perform zoom in.
58+
**Ctrl (key) + Scroll the mouse wheel down** - To perform zoom out.
8.41 KB
Loading

0 commit comments

Comments
 (0)