Skip to main content

TCustomdxComponentPrinter.OnBeforeExportToPDF Event

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

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