How can I help you?
Organize pages events
9 Jun 20262 minutes to read
Use the page organizer events to react to rotations, rearranges, inserts, deletes, and other page-manipulation actions performed in the page organizer.
| Name | Description |
|---|---|
| PageOrganizerSaveRequested | Triggers when the page organizer requests a save of the modified document. |
| PageOrganizerZoomChanged | Triggers when the page organizer zoom level changes. |
| PageOrganizerVisibilityChanged | Triggers when the page organizer dialog visibility changes. |
PageOrganizerSaveRequested
Raised when the user saves changes from the page organizer (for example, after clicking the Save as button). The event args include:
-
FileName: the current PDF file name. -
DownloadDocument: a base64 string containing the modified PDF bytes. -
Cancel: set totrueto prevent the built-in save behavior.
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
Height="100%"
Width="100%">
<PdfViewerEvents PageOrganizerSaveRequested="SavePages"></PdfViewerEvents>
</SfPdfViewer2>
@code {
private void SavePages(PageOrganizerSaveEventArgs args)
{
Console.WriteLine($"Saved File Name: {args.FileName}");
}
}PageOrganizerZoomChanged
Raised when the zoom slider in the page organizer changes value. Enable the slider by setting PageOrganizerSettings.ShowImageZoomingSlider to true.
Event args:
-
PreviousZoom: previous zoom value. -
CurrentZoom: current zoom value.
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
Height="100%"
Width="100%">
<PdfViewerEvents PageOrganizerZoomChanged="ZoomChange"></PdfViewerEvents>
</SfPdfViewer2>
@code {
private void ZoomChange(PageOrganizerZoomChangedEventArgs args)
{
Console.WriteLine($"Current Zoom: {args.CurrentZoom}");
}
}PageOrganizerVisibilityChanged
Raised when the page organizer dialog is opened or closed.
<SfPdfViewer2 DocumentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
Height="100%"
Width="100%" PageOrganizerVisibilityChanged="VisibleChanged">
</SfPdfViewer2>
@code {
private void VisibleChanged(bool isVisible)
{
Console.WriteLine($"Organize dialog visibility: {isVisible}");
}
}See also
- Overall viewer events: Event
- Annotation events: Annotation events
- Form designer events: Form field events