Class PageOrganizerSaveEventArgs
Provides event data for the save action in the SfPdfViewer2 Page Organizer dialog.
Inherited Members
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class PageOrganizerSaveEventArgs : EventArgs
Remarks
The PageOrganizerSaveEventArgs class contains details about the save operation, including the document stream, file name, and cancellation flag. Developers can use this information to customize or intercept the save behavior.
Examples
void OnPageOrganizerSaveRequested(PageOrganizerSaveEventArgs args)
{
if (args.FileName == "Restricted.pdf")
{
args.Cancel = true;
Console.WriteLine("Save operation canceled due to restricted file name.");
}
}
Constructors
PageOrganizerSaveEventArgs()
Declaration
public PageOrganizerSaveEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the save operation should be canceled in the SfPdfViewer2 Page Organizer dialog.
Declaration
public bool Cancel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A |
Remarks
Set this property to true to cancel the save operation based on custom logic or validation.
Examples
void OnPageOrganizerSaveRequested(PageOrganizerSaveEventArgs args)
{
if (args.FileName == "Restricted.pdf")
{
args.Cancel = true;
Console.WriteLine("Save operation canceled.");
}
}
DownloadDocument
Gets the stream representing the document to be downloaded in the SfPdfViewer2 Page Organizer dialog.
Declaration
public Stream DownloadDocument { get; set; }
Property Value
| Type | Description |
|---|---|
| Stream | A |
Remarks
This stream contains the document data that will be saved or downloaded. You can use it to manipulate or store the document programmatically.
Examples
void OnPageOrganizerSaveRequested(PageOrganizerSaveEventArgs args)
{
var stream = args.DownloadDocument;
}
FileName
Gets the file name used when saving the document in the SfPdfViewer2 Page Organizer dialog.
Declaration
public string FileName { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A |
Remarks
You can customize this file name before the document is saved. Useful for applying naming conventions or user-defined labels.
Examples
void OnPageOrganizerSaveRequested(PageOrganizerSaveEventArgs args)
{
string FileName = args.FileName;
}