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

TCustomdxComponentPrinter.OnBeforeExportToPDF Event

In This Article

Enables you to adjust PDF export settings before a specific link’s report is exported to a PDF file or optionally cancel the export.

#Declaration

Delphi
property OnBeforeExportToPDF: TdxReportLinkBeforeExportToPDFEvent read; write;

#Remarks

The DoBeforeExportToPDF function fires this event in response to calling any of the following export methods:

The name and location of the resulting PDF file and export options provided by an end-user using the Save As and PDF Export Options dialogs to these methods are passed as the AFileName and AOptions event parameters, respectively. You can validate the AFileName and adjust the AOptions values if required. If the export is initiated with the dxPSExportToPDFStream function, an empty string is passed as the AFileName parameter.

To cancel the export, pass False as the AAllow parameter (which is initially set to True).

See Also