From 7278f3e92b74b31d6803e4e9b8d2ce71ed842b9a Mon Sep 17 00:00:00 2001 From: Spencer Harston Date: Wed, 24 Jul 2024 07:30:27 -0600 Subject: [PATCH] Fix: problem overflow due to page breaks (#21) * fix: problems broken by page breaks * chore: version++ --- package-lock.json | 4 ++-- package.json | 2 +- src/main.ts | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c293680..f66d044 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "math-sheets", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "math-sheets", - "version": "0.5.0", + "version": "0.5.1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 71fa5ef..61def6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "math-sheets", - "version": "0.5.0", + "version": "0.5.1", "private": true, "description": "Generate PDF worksheets of simple math problems in the browser.", "scripts": { diff --git a/src/main.ts b/src/main.ts index a810bde..bf222f8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -459,14 +459,14 @@ async function generatePDF(problems: Problem[]) { styles: { halign: "center", valign: "middle", - font: selectedFont?.name!, - fontSize: 16, minCellHeight: 46, minCellWidth: 28, + font: doc.getFont().fontName, + fontSize: 16, textColor: "black" }, - theme: "plain", - margin: { vertical: 20, horizontal: 16 }, + theme: "plain", // no grid lines + margin: { vertical: 22, horizontal: 16 }, didDrawPage: (data) => { // footer let footer = `Created with mathsheets.net`;