From 3af40cc7bc2278d2da7f6faec56cd22893118f12 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Thu, 15 Jun 2023 23:16:53 +0200 Subject: [PATCH] Update weasyprint parameters for version 57.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DebianĀ 12 (bookworm) has upgraded its weasyprint version and it no longer includes the --format parameter, because now it only can output to PDF. --- pkg/invoices.go | 2 +- pkg/quote.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/invoices.go b/pkg/invoices.go index 6618df6..da67717 100644 --- a/pkg/invoices.go +++ b/pkg/invoices.go @@ -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() diff --git a/pkg/quote.go b/pkg/quote.go index bb9c758..fa277d0 100644 --- a/pkg/quote.go +++ b/pkg/quote.go @@ -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()