Closed watschi closed 3 weeks ago
Did some more research, the --format
option has been deprecated as of weasyprint version 53 (2021).
Ubuntu 20.04, which will reach End of Standard Support next April, ships version 51. Probably not worth it to implement any changes based on it.
Describe the Bug
When configuring the
EXPORT_PDF_COMMAND
as documented at Admin Documentation > PDF Rendering, an error is thrown becauseweasyprint
prints its help message due to a missing option or file extension.Steps to Reproduce
EXPORT_PDF_COMMAND="weasyprint {input_html_path} {output_pdf_path}"
Expected Behaviour
Export the page to pdf.
Screenshots or Additional Context
This issue can be resolved by adding the
--format pdf
argument to the weasyprint command (see https://codeberg.org/bookstack/website/pulls/190). Edit: Or by updatingweasyprint
to a current version. Opening this issue so others affected can find it.Also @ssddanbrown: Does it make sense to add a pdf extension to the export filename here (PdfGenerator.php)? I know other tools like pandoc also use file extensions to determine the output format if not explicitly mentioned, maybe this will save some people some time.
weasyprint version:
Browser Details
No response
Exact BookStack Version
v24.10