Update weasyprint parameters for version 57.2

Debian 12 (bookworm) has upgraded its weasyprint version and it no
longer includes the --format parameter, because now it only can output
to PDF.
This commit is contained in:
jordi fita mas 2023-06-15 23:16:53 +02:00
parent 010e174de7
commit 3af40cc7bc
2 changed files with 2 additions and 2 deletions

View File

@ -275,7 +275,7 @@ func ServeInvoice(w http.ResponseWriter, r *http.Request, params httprouter.Para
}
func mustWriteInvoicePdf(w io.Writer, r *http.Request, inv *invoice) {
cmd := exec.Command("weasyprint", "--format", "pdf", "--stylesheet", "web/static/invoice.css", "-", "-")
cmd := exec.Command("weasyprint", "--stylesheet", "web/static/invoice.css", "-", "-")
var stderr bytes.Buffer
cmd.Stderr = &stderr
stdin, err := cmd.StdinPipe()

View File

@ -272,7 +272,7 @@ func ServeQuote(w http.ResponseWriter, r *http.Request, params httprouter.Params
}
func mustWriteQuotePdf(w io.Writer, r *http.Request, quo *quote) {
cmd := exec.Command("weasyprint", "--format", "pdf", "--stylesheet", "web/static/invoice.css", "-", "-")
cmd := exec.Command("weasyprint", "--stylesheet", "web/static/invoice.css", "-", "-")
var stderr bytes.Buffer
cmd.Stderr = &stderr
stdin, err := cmd.StdinPipe()