Class FormFieldsImportEventArgs
Provides event data for the form field importing event in the SfPdfViewer2 component.
Inheritance
System.Object
FormFieldsImportEventArgs
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class FormFieldsImportEventArgs : Object
Remarks
The FormFieldsImportEventArgs
class contains information about the form field import operation.
It allows developers to control whether the import should proceed by setting the Cancel property.
Examples
<SfPdfViewer2 @ref="Viewer" DocumentPath="@DocumentPath" Height="100%" Width="100%">
<PdfViewerEvents FormFieldsImporting="@OnFormFieldsImporting"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldsImporting(FormFieldsImportEventArgs args)
{
// Execute logic before form fields import begins
Console.WriteLine("Form fields import started.");
// Implement additional logic if needed
}
}
Constructors
FormFieldsImportEventArgs()
Declaration
public FormFieldsImportEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the form field import operation should be canceled in the SfPdfViewer2 component.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A |
Remarks
Setting the Cancel property to true
will prevent the form fields from being imported into the SfPdfViewer2 component.
This is useful when validation or custom conditions must be met before allowing the import.
Examples
<SfPdfViewer2 @ref="Viewer" DocumentPath="@DocumentPath" Height="100%" Width="100%">
<PdfViewerEvents FormFieldsImporting="@OnFormFieldsImporting"></PdfViewerEvents>
</SfPdfViewer2>
@code {
void OnFormFieldsImporting(FormFieldsImportEventArgs args)
{
// Prevent the form field import process
args.Cancel = true;
Console.WriteLine("Form fields import operation was canceled.");
}
}