You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Magnification.md
+28-24Lines changed: 28 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
layout: post
3
3
title: Magnification in .NET MAUI PDF Viewer control | Syncfusion
4
-
description: Learn here all about magnification feature in Syncfusion<sup>®</sup> .NET MAUI PDF Viewer (SfPdfViewer) control and more.
4
+
description: Learn to use magnification in Syncfusion<sup>®</sup> .NET MAUI PDF Viewer including zoom factor control and zoom mode options.
5
5
platform: MAUI
6
6
control: SfPdfViewer
7
7
documentation: ug
@@ -10,11 +10,11 @@ keywords: .net maui pdf viewer, .net maui view pdf, pdf viewer in .net maui, .ne
10
10
11
11
# Magnification .NET MAUI PDF Viewer (SfPdfViewer)
12
12
13
-
The content of a PDF document can be efficiently zoomed in and out by pinching or changing the zoom factor programmatically. This section walks through the magnification functionalities supported in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html).
13
+
The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) control supports intuitive magnification features, allowing users to zoom in and out of PDF content using gestures or programmatic controls.
14
14
15
-
## Change the zoom factor
15
+
## Adjusting the Zoom Factor
16
16
17
-
You can change or control the zoom in the PDF Viewer using the [ZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ZoomFactor) property. Refer to the following code example.
17
+
You can control the zoom level using the [ZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ZoomFactor) property. Refer to the following code example.
18
18
19
19
{% tabs %}
20
20
{% highlight xaml %}
@@ -26,11 +26,15 @@ PdfViewer.ZoomFactor = 3;
26
26
{% endhighlight %}
27
27
{% endtabs %}
28
28
29
-
You can also obtain the current zoom factor at which the document is displayed in the PDF Viewer using the [ZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ZoomFactor) property.
29
+
You can also retrieve the current zoom level using the same property.
30
30
31
-
##Change the minimum and maximum zoom factor
31
+
### Setting Minimum and Maximum Zoom Limits
32
32
33
-
By default, the zoom factor can be adjusted or set between 1 and 4 to magnify the document displayed in the PDF Viewer. But it can also be restricted to a certain level by adjusting the [minimum](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MinZoomFactor) and [maximum](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MaxZoomFactor) zoom factors.
33
+
By default, the zoom range varies by platform:
34
+
***Mobile (Android/iOS):** 1.0 to 4.0
35
+
***Desktop (Windows/macOS):** 0.25 to 4.0
36
+
37
+
To restrict zoom levels, use the [MinZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MinZoomFactor) and [MaxZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MaxZoomFactor) properties.
34
38
35
39
The following code example explains restricting the zoom factor between 0.5 and 2.
36
40
@@ -45,36 +49,36 @@ PdfViewer.MaxZoomFactor = 2;
45
49
{% endhighlight %}
46
50
{% endtabs %}
47
51
48
-
N>If the [ZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ZoomFactor) value is set beyond the [MinZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MinZoomFactor) and [MaxZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MaxZoomFactor) limits, then it will not be effective.
52
+
N> If the [ZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ZoomFactor) is set outside the defined [MinZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MinZoomFactor) and [MaxZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_MaxZoomFactor) range, it will be ignored.
53
+
54
+
You can download a sample project demonstrating magnification features [here](https://github.com/SyncfusionExamples/maui-pdf-viewer-examples).
49
55
50
-
The example project with the zoom or magnification functionalities can be downloaded [here](https://github.com/SyncfusionExamples/maui-pdf-viewer-examples).
56
+
## Zoom Modes
51
57
52
-
## Zoom modes
58
+
The PDF Viewer supports the following zoom modes via the [ZoomMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#fields) property:
53
59
54
-
The .NET MAUI PDF Viewer supports the following zoom modes:
55
-
1. Fit to Page
56
-
2. Fit to Width
60
+
1.**Fit to Page** – Displays the entire page within the viewport.
61
+
2.**Fit to Width** – Expands the page to fill the width of the viewer.
57
62
58
-
Fit-to-page ensures that users can see the entire page content to get a quick overview without having to scroll. Fit-to-width is helpful when reading documents with narrow columns, such as newspaper articles or other multicolumn layouts.
59
-
You can change the zoom mode using the [SfPdfViewer.ZoomMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#fields) property of the PDF Viewer, the default value for [SfPdfViewer.ZoomMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#fields) is [ZoomMode.Default](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#Syncfusion_Maui_PdfViewer_ZoomMode_Default).
63
+
The default value is [ZoomMode.Default](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#Syncfusion_Maui_PdfViewer_ZoomMode_Default)
60
64
61
-
### Change zoom mode from the toolbar
65
+
### Zoom Mode via Built-In Toolbar
62
66
63
-
**Using the magnification drop-down tool on the desktop**
67
+
#### Desktop Toolbar
64
68
65
-
On the desktop built-in toolbar, a magnifying tool is available that shows the current zoom percentage of the document. Using the tool, you can choose a zoom percentage from a predefined set of values. Additionally, you can choose the fit-to-width or fit-to-page option.
69
+
The built-in toolbar includes a magnification dropdown showing the current zoom percentage. Users can select predefined zoom levels or choose **Fit to Page** / **Fit to Width**.
On the mobile built-in toolbar, by default, the magnifying tool is not visible. When the document [ZoomFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ZoomFactor) is changed, it becomes visible. Using the tool, you can choose the `Fit to Width` or `Fit to Page` option. When an option is selected, the icon will no longer be visible until the zoom percentage changes again.
75
+
On mobile, the magnification tool appears only after the zoom factor changes. Users can then select **Fit to Page** or **Fit to Width**. Once selected, the icon disappears until the zoom factor changes again.
You can change the [SfPdfViewer.ZoomMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#fields) using the [ZoomMode.FitToPage](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#Syncfusion_Maui_PdfViewer_ZoomMode_FitToPage) enumeration. It will magnify the PDF document so that the entire PDF page is visible in the view port.
You can change the [SfPdfViewer.ZoomMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#fields) using the [ZoomMode.FitToWidth](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.ZoomMode.html#Syncfusion_Maui_PdfViewer_ZoomMode_FitToWidth) enumeration. It will magnify the PDF document so that the widest page of the PDF document fits the width of the view port.
N> When the zoom factor of a PDF is changed, the zoom mode automatically changes to the default setting. After this change, you can manually adjust the zoom mode to either "Fit to Page" or "Fit to Width" as needed.
113
+
N> When the `ZoomFactor`is manually changed, the `ZoomMode` resets to `Default`. You can reapply the desired zoom mode afterward.
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Overview.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,8 @@ The [.NET MAUI PDF Viewer](https://www.syncfusion.com/maui-controls/maui-pdf-vie
15
15
**Key Features**
16
16
17
17
***Virtual scrolling** - Easily scroll through the pages in the document fluently. The pages are rendered only when required to increase the loading and scrolling performance.
18
-
***Magnification** - The content of a PDF document can be efficiently zoomed in and out by pinching or changing the zoom factor programmatically.
18
+
***Magnification** - The content of a PDF document can be efficiently zoomed in and out by pinching or changing the zoom factor programmatically.
19
+
***Zoom modes** - Improve document readability by adjusting magnification to suit your viewing needs. Use *Fit to Page* to display the entire page without scrolling, ideal for quick overviews. Choose *Fit to Width* for optimal reading of content with narrow columns, such as newspapers or multi-column layouts.
19
20
***Page navigation** - Navigate to the desired pages instantly using the page navigation option programmatically or by dragging the scroll head in the UI.
20
21
***Open password-protected PDFs** - Load and view password-protected PDFs in a hassle-free way. You can design a custom password request view and integrate the functionality easily with the options available.
21
22
***Built-in Toolbar** - The PDF Viewer control includes a built-in toolbar, offering a seamless user experience with essential functions such as page navigation, text search, page layout mode adjustments, and various annotation tools. The toolbar's visibility can also be customized according to user preferences.
0 commit comments