Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxPDFCustomViewer.OnAttachmentSave Event

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:

#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 an OnAttachmentSave event handler to prevent users from saving the attachment.

Refer to the TdxPDFViewerOnAttachmentActionEvent type description for detailed information on all available options.

See Also