How can I help you?
PDF Form Import and Export Events in Angular
7 Apr 20262 minutes to read
Import and export events enable tracking and customization of the full life cycle of form data imported into or exported from the PDF Viewer.
Use events to:
- Validate inputs before processing.
- Show progress indicators.
- Log audit trails.
- Block operations based on business rules.
Each event provides detailed context through typed event arguments such as ImportStartEventArgs, ImportSuccessEventArgs, ImportFailureEventArgs, ExportStartEventArgs, ExportSuccessEventArgs, and ExportFailureEventArgs.
Import Events
- importStart — Fires when an import begins.
- importSuccess — Fires when form fields are successfully imported.
- importFailed — Fires if the import fails.
Example: Handle Import Events
onImportStart(args: any): void {
console.log('Import started', args);
// e.g. show spinner, validate inputs
}
onImportSuccess(args: any): void {
console.log('Import success', args);
// e.g. hide spinner, show toast
}
onImportFailed(args: any): void {
console.error('Import failed', args);
// e.g. show error dialog
}Export Events
- exportStart — Fires when an export begins.
- exportSuccess — Fires when form fields are successfully exported.
- exportFailed — Fires if the export fails.
Example: Handle Export Events
onExportStart(args: any): void {
console.log('Export started', args);
// e.g. disable export UI
}
onExportSuccess(args: any): void {
console.log('Export success', args);
// e.g. enable UI, provide download link
}
onExportFailed(args: any): void {
console.error('Export failed', args);
// e.g. re-enable UI, notify user
}Key Notes
- importStart, importSuccess, importFailed cover the full import life cycle.
- exportStart, exportSuccess, exportFailed cover the full export life cycle.