-
Notifications
You must be signed in to change notification settings - Fork 13
Added UG for maintain Zoom level in single page Feature in MAUI PDF Viewer #2351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KSilambharasanSF4548
wants to merge
8
commits into
development
Choose a base branch
from
MAUIPersistZoom
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e195c4e
Added UG for maintain Zoom level in single page
KSilambharasanSF4548 bc2b016
Add files via upload
KSilambharasanSF4548 bd073c7
Rename WithoutPersistZoom-ezgif.com-video-to-gif-converter.gif to Dis…
KSilambharasanSF4548 cb13b39
Rename persistZoomm-ezgif.com-video-to-gif-converter.gif to EnablePer…
KSilambharasanSF4548 2e2ec07
Add images for PersistZoomOnPageChange feature
KSilambharasanSF4548 1739dba
Change zoom factor to 1.75 in PDF viewer
KSilambharasanSF4548 ba47053
Improve documentation for PersistZoomOnPageChange
KSilambharasanSF4548 46f6d99
Update Magnification.md for zoom persistence details
KSilambharasanSF4548 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+1.38 MB
Document-Processing/PDF/PDF-Viewer/maui/Images/DisablePersistZoom.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,4 +110,53 @@ pdfViewer.ZoomMode = ZoomMode.FitToWidth; | |
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
| N> When the `ZoomFactor` is manually changed, the `ZoomMode` resets to `Default`. You can reapply the desired zoom mode afterward. | ||
| N> When the `ZoomFactor` is manually changed, the `ZoomMode` resets to `Default`. You can reapply the desired zoom mode afterward. | ||
|
|
||
| ## Maintain Zoom Level in Single Page View Mode | ||
|
|
||
| The PDF Viewer supports persisting the zoom level in single-page view via the `PersistZoomOnPageChange` property. | ||
|
|
||
| You can persist the current zoom level across page changes in single-page view mode by enabling the `PersistZoomOnPageChange` property. This behavior keeps the zoom level consistent when navigating between pages using the built-in controls or programmatic APIs. | ||
|
|
||
| The default value of `PersistZoomOnPageChange` is `False`. | ||
|
|
||
| ### Enable PersistZoomOnPageChange | ||
|
|
||
| You can enable persistent zoom by setting the `PersistZoomOnPageChange` property to `True`. When enabled, the viewer preserves the numeric `ZoomFactor` when switching pages in `SinglePage` layout and applies that same zoom to the destination page. Refer to the following code example: | ||
|
|
||
| {% tabs %} | ||
| {% highlight xaml %} | ||
| <syncfusion:SfPdfViewer x:Name="PdfViewer" | ||
| PageLayoutMode="SinglePage" | ||
| PersistZoomOnPageChange="True" /> | ||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
| // Enable persistence and set an initial zoom | ||
| PdfViewer.PageLayoutMode = PageLayoutMode.SinglePage; | ||
| PdfViewer.PersistZoomOnPageChange = true; | ||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| ### Disable PersistZoomOnPageChange | ||
|
|
||
| Set `PersistZoomOnPageChange` to `False` to keep the viewer's default behavior. When disabled, navigating to a different page resets the viewer to the default zoom level unless you explicitly set a zoom after navigation. Refer to the following example: | ||
|
|
||
| {% tabs %} | ||
| {% highlight xaml %} | ||
| <syncfusion:SfPdfViewer x:Name="PdfViewer" | ||
| PageLayoutMode="SinglePage" | ||
| PersistZoomOnPageChange="False" /> | ||
| {% endhighlight %} | ||
|
|
||
| {% highlight c# %} | ||
| // Disable persistence | ||
| PdfViewer.PersistZoomOnPageChange = false; | ||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| N> The default value of `PersistZoomOnPageChange` is `False`; enable it to maintain reading continuity in single-page mode. | ||
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this para,
In single-page view mode, the zoom level resets to default each time you navigate to a new page. To maintain a consistent zoom factor throughout the document, enable the PersistZoomOnPageChange property. This applies whether navigation is triggered by the built-in toolbar controls or programmatic APIs.