pip install kpireport-static
- class kpireport_static.StaticOutputDriver(report: kpireport.report.Report, **kwargs)¶
Export a report’s contents to disk.
the directory to output the report contents to. (Default “./_build”)
The output format, which can be one of “html” or “png”. (Default “html”.) Depending on the format, the output will have a few different forms:
The HTML report will be outputted in a new directory in the output path, named after the report. A “latest” directory will also be outputted/updated with the contents of this report.
The report will be rendered as a single PNG image named after the report in the output path, and a “latest” PNG will also be outputted.
wkhtmltopdfis required if using PNG output. You will probably also need to install
Xvfbif using a Docker container that doesn’t already have an X server packaged.
Fixes an issue where relative font sizes would not be rendered accurately when using the PNG output format.
Fixes issue with PNG output when no X server is installed; imgkit will fail because wkhtmltoimage requires an X server to capture the output. Xvfb is already supported as a workaround; if this is installed on the host, configure imgkit to use it.
output_pathoption is now available and can be used to instruct the plugin to output a rendered PNG file instead of the default HTML contents. PNG output requires the
wkhtmltopdfbinary to be installed on the host.