From e833eeca442825285936cd6e96ba2f20c4beb0a6 Mon Sep 17 00:00:00 2001 From: stingelin Date: Mon, 26 Feb 2024 01:01:27 +0100 Subject: [PATCH 1/2] fix font ref According to the (PDFTable Interface)[https://github.com/schoero/swissqrbill/blob/main/src/pdf/table.ts] font should be fontName --- examples/how-to-create-a-complete-qr-bill/src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/how-to-create-a-complete-qr-bill/src/index.js b/examples/how-to-create-a-complete-qr-bill/src/index.js index 1ffd57d..af36177 100644 --- a/examples/how-to-create-a-complete-qr-bill/src/index.js +++ b/examples/how-to-create-a-complete-qr-bill/src/index.js @@ -109,7 +109,7 @@ const table = new Table({ width: mm2pt(30) } ], - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", height: 20, padding: 5, textColor: "#fff", @@ -155,10 +155,10 @@ const table = new Table({ text: "", width: mm2pt(20) }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "Summe" }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "CHF 2'420.00", width: mm2pt(30) } @@ -206,10 +206,10 @@ const table = new Table({ text: "", width: mm2pt(20) }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "Rechnungstotal" }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "CHF 2'606.35", width: mm2pt(30) } From e97c227d4d312e8bbad0c9de22f6d7806df97229 Mon Sep 17 00:00:00 2001 From: stingelin Date: Mon, 26 Feb 2024 01:05:49 +0100 Subject: [PATCH 2/2] Update how-to-create-a-complete-qr-bill.md --- docs/how-to-create-a-complete-qr-bill.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/how-to-create-a-complete-qr-bill.md b/docs/how-to-create-a-complete-qr-bill.md index b20939e..8d91623 100644 --- a/docs/how-to-create-a-complete-qr-bill.md +++ b/docs/how-to-create-a-complete-qr-bill.md @@ -232,7 +232,7 @@ const table = new Table({ width: mm2pt(30) } ], - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", height: 20, padding: 5, textColor: "#fff", @@ -278,10 +278,10 @@ const table = new Table({ text: "", width: mm2pt(20) }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "Summe" }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "CHF 2'420.00", width: mm2pt(30) } @@ -329,10 +329,10 @@ const table = new Table({ text: "", width: mm2pt(20) }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "Rechnungstotal" }, { - font: "Helvetica-Bold", + fontName: "Helvetica-Bold", text: "CHF 2'606.35", width: mm2pt(30) }