From b5636c3e565f347b058767df0187f1d437dcd445 Mon Sep 17 00:00:00 2001 From: Blake McBride Date: Sun, 18 Aug 2024 15:33:43 -0500 Subject: [PATCH] Support null titles in report --- src/main/core/org/kissweb/Groff.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/core/org/kissweb/Groff.java b/src/main/core/org/kissweb/Groff.java index 60b75c5..e1f460a 100644 --- a/src/main/core/org/kissweb/Groff.java +++ b/src/main/core/org/kissweb/Groff.java @@ -62,7 +62,7 @@ private Groff() {} * On the front-end side, see JavaScript Utils.showReport() * * @param fnamePrefix final PDF file name prefix - * @param title report title + * @param title report title or null * @param landscape true if landscape format, portrait otherwise * @throws IOException */ @@ -377,7 +377,8 @@ private void writePageHeader(String title) { else if (!runDate.isEmpty()) pw.println("'tl '''" + runDate + "'"); pw.println("'ce " + (1 + pageTitleLines.size())); - pw.println(title); + if (title != null && !title.isEmpty()) + pw.println(title); for (String line : pageTitleLines) pw.println(line); pw.println("'SP");