Renders an Axion report as a PDF using Playwright's headless Chromium browser.
Optionally generates a PNG preview via a screenshot of the same report URL.
Replaces the legacy weasyprint approach. Playwright renders the full page including
JavaScript-generated content and @media print CSS automatically.
processor = ObjProcessText()
# Generate PDF only
filename = processor.process("my_report", "param1^param2")
# Generate PDF + PNG preview
filename = processor.build_page("my_report", "param1^param2")
^ delimited)report_name^param1^param2^param3^param4^param5^param6^param7^param8^password
param1–param8)def_report.Options contains CSS for the report → injected as a style tag$site_url/style/pdf.css is loaded as a stylesheet link$hostbasedir$/objects/local.documents/<report_name>/<file_param>.pdf
pip install playwright
playwright install chromium
cythonize -3 -a -i ObjTextReportpdf.py
Updated : 2025-10-02