TdxPDFCustomViewer.OnAttachmentSave Event
In This Article
Allows you to prevent users from saving certain PDF document attachments.
#Declaration
Delphi
property OnAttachmentSave: TdxPDFViewerOnAttachmentActionEvent read; write;
#Remarks
You can handle the OnAttachmentSave
event to implement a custom attachment save operation or prevent users from saving certain document attachments.
#Event Occurrence
The OnAttachmentSave
event occurs every time the Save As dialog is about to appear when a user clicks:
- The active Save Attachment button on the Attachments page on the Navigation Pane.
- The Save Embedded File to Disk… item in a context menu displayed for a file attachment annotation or a file listed on the Attachments page.
#Event Parameters
The following parameters are available within an OnAttachmentSave
event handler:
Sender
- Provides access to the PDF Viewer control that raised the
OnAttachmentSave
event. AAttachment
- Provides access to the target attachment. For example, you can use the
AAttachment
.Data property to implement a custom attachment save routine. AHandled
- Specifies if the PDF Viewer control opens the Save As dialog for the target attachment. Assign
True
to this parameter within anOnAttachmentSave
event handler to prevent users from saving the attachment.
Refer to the TdxPDFViewerOnAttachmentActionEvent type description for detailed information on all available options.
See Also