export_pdf#

Report.export_pdf(file_name: str = '', query: dict | None = None, page: list | None = None, delay: int | None = None) bool#

Export report as PDF. Currently works only with a local ADR installation, and not a docker image.

Parameters:
file_namestr

Path and filename for the PDF file to export.

querydict, optional

Dictionary for query parameters to apply to report template before export. Default: None

pagelist, optional

List of integers that represents the size of the exported pdf. Default: None, which corresponds to A4 size

delayint, optional

Seconds to delay the start of the pdf export operation. Default: None, which corresponds to no delay

Returns:
bool

Success status of the PDF export: True if it worked, False otherwise

Examples

import ansys.dynamicreporting.core as adr
adr_service = adr.Service(ansys_installation = r'C:\Program Files\ANSYS Inc\v232')
ret = adr_service.connect()
my_report = adr_service.get_report(report_name = "My Top Report")
succ = my_report.export_pdf(file_name=r'D:\tmp\myreport.pdf')