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:
parent
010e174de7
commit
3af40cc7bc
|
@ -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) {
|
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
|
var stderr bytes.Buffer
|
||||||
cmd.Stderr = &stderr
|
cmd.Stderr = &stderr
|
||||||
stdin, err := cmd.StdinPipe()
|
stdin, err := cmd.StdinPipe()
|
||||||
|
|
|
@ -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) {
|
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
|
var stderr bytes.Buffer
|
||||||
cmd.Stderr = &stderr
|
cmd.Stderr = &stderr
|
||||||
stdin, err := cmd.StdinPipe()
|
stdin, err := cmd.StdinPipe()
|
||||||
|
|
Loading…
Reference in New Issue