Allow to convert html->pdf via weasyprint

This commit is contained in:
eikek
2022-11-05 00:48:32 +01:00
parent a5315f44ee
commit df75fbddcd
8 changed files with 146 additions and 10 deletions

View File

@ -551,6 +551,10 @@ Docpell Update Check
"""
}
# Which HTML->PDF converter command to use. One of: wkhtmlpdf,
# weasyprint.
html-converter = "wkhtmlpdf"
# To convert HTML files into PDF files, the external tool
# wkhtmltopdf is used.
wkhtmlpdf {
@ -568,7 +572,22 @@ Docpell Update Check
]
timeout = "2 minutes"
}
working-dir = ${java.io.tmpdir}"/docspell-convert"
working-dir = ${java.io.tmpdir}"/docspell-wkhtmltopdf"
}
# An alternative to wkhtmltopdf is weasyprint.
weasyprint {
command = {
program = "weasyprint"
args = [
"--optimize-size", "all",
"--encoding", "{{encoding}}",
"-",
"{{outfile}}"
]
timeout = "2 minutes"
}
working-dir = ${java.io.tmpdir}"/docspell-weasyprint"
}
# To convert image files to PDF files, tesseract is used. This