How can I help you?
Organize Pages Events in ASP.NET MVC PDF Viewer
30 Oct 20253 minutes to read
The PDF Viewer provides events to track and respond to actions within the page organizer, allowing for the customization of page manipulation features.
pageOrganizerSaveAs
The pageOrganizerSaveAs event is triggered when a save action is performed in the page organizer.
- Occurs when the Save as button in the page organizer toolbar is clicked after modifying the document structure.
The event arguments provide the necessary information about the save event:
-
fileName: The name of the currently loaded PDF document. -
downloadDocument: A base64 string of the modified PDF document data. -
cancel: A boolean that, when set totrue, prevents the default save action from proceeding.
<div id="e-pv-e-sign-pdfViewer-div">
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").PageOrganizerSaveAs("pageOrganizerSaveAs").Render()
</div>
<script>
function pageOrganizerSaveAs(args) {
console.log('File Name is' + args.fileName);
console.log('Document data' + args.downloadDocument);
}
</script><div id="e-pv-e-sign-pdfViewer-div">
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").PageOrganizerSaveAs("pageOrganizerSaveAs").Render()
</div>
<script>
function pageOrganizerSaveAs(args) {
console.log('File Name is' + args.fileName);
console.log('Document data' + args.downloadDocument);
}
</script>pageOrganizerZoomChanged
The pageOrganizerZoomChanged event is triggered when the zoom level of the page organizer is changed.
- This event is fired when the user interacts with the zoom slider in the page organizer. The
showImageZoomingSliderproperty inpageOrganizerSettingsmust be set totruefor the slider to be visible.
Event arguments:
-
previousZoomValue: The previous zoom value. -
currentZoomValue: The current zoom value.
<div id="e-pv-e-sign-pdfViewer-div">
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").PageOrganizerSettings(new { CanDelete = false, CanInsert = false, CanRotate = false, canCopy = false, canRearrange = false, canImport = false, imageZoom = 1, showImageZoomingSlider = true, imageZoomMin = 1, imageZoomMax = 5 }).PageOrganizerZoomChanged("pageOrganizerZoomChanged").Render()
</div>
<script>
function pageOrganizerZoomChanged(args) {
console.log('Previous Zoom Value is' + args.previousZoom);
console.log('Current Zoom Value is' + args.currentZoom);
}
</script><div id="e-pv-e-sign-pdfViewer-div">
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").PageOrganizerSettings(new { CanDelete = false, CanInsert = false, CanRotate = false, canCopy = false, canRearrange = false, canImport = false, imageZoom = 1, showImageZoomingSlider = true, imageZoomMin = 1, imageZoomMax = 5 }).PageOrganizerZoomChanged("pageOrganizerZoomChanged").Render()
</div>
<script>
function pageOrganizerZoomChanged(args) {
console.log('Previous Zoom Value is' + args.previousZoom);
console.log('Current Zoom Value is' + args.currentZoom);
}
</script>Related event documentation
- Overall Viewer events: Event
- Annotation events: Annotation events
- Form designer events: Form field events