diff --git a/CHANGES.md b/CHANGES.md index c36aa3a3..73c53d84 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ ## 📅 CHANGES -## Version 2.7.5 (2026-11-24) +## Version 2.7.5 (2026-11-01) - ServiceError.ref is now sanitized to null if it is blank or empty, preventing the inclusion of empty or whitespace-only strings in error responses. This change enhances the clarity and consistency of error reporting by ensuring that only meaningful references are included in the ServiceError object. diff --git "a/README_\344\270\255\346\226\207.md" "b/README_\344\270\255\346\226\207.md" index 65203976..712d143c 100644 --- "a/README_\344\270\255\346\226\207.md" +++ "b/README_\344\270\255\346\226\207.md" @@ -1,9 +1,9 @@ -- **[Apache Central Repository][1]** -- **[Maven Central Repository][2]** +- **[Maven Central Repository][1]** +- **[Apache Central Repository][2]** - **[mvnrepository.com][3]** -[1]: https://repo.maven.apache.org/maven2/org/summerboot/jexpress/2.7.5 -[2]: https://central.sonatype.com/artifact/org.summerboot/jexpress/2.7.5 +[1]: https://central.sonatype.com/artifact/org.summerboot/jexpress/2.7.5 +[2]: https://repo.maven.apache.org/maven2/org/summerboot/jexpress/2.7.5 [3]: https://mvnrepository.com/artifact/org.summerboot/jexpress/2.7.5 [View Changelog (CHANGES)](CHANGES.md) diff --git a/pom.xml b/pom.xml index 14e42f61..9729da50 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.summerboot jexpress - 2.7.5-SNAPSHOT + 2.7.5 jar jExpress ${project.version} jExpress focuses on addressing non-functional and operational maintainability needs, some of which Spring Boot may not yet provide. diff --git a/src/main/java/org/summerboot/jexpress/integration/pdf/PdfBuilder.java b/src/main/java/org/summerboot/jexpress/integration/pdf/PdfBuilder.java index c684f354..bab47379 100644 --- a/src/main/java/org/summerboot/jexpress/integration/pdf/PdfBuilder.java +++ b/src/main/java/org/summerboot/jexpress/integration/pdf/PdfBuilder.java @@ -132,6 +132,10 @@ public boolean removeListener(SinglePageHeightCalculationListener listener) { return listeners.remove(listener); } + public List getListeners() { + return List.copyOf(listeners); + } + public boolean isDumpEnabled() { return BootConstants.isDebugMode() && dumpDir.exists(); } @@ -151,7 +155,22 @@ public byte[] htmlToPdf(String requesterTxId, String htmlContent, PdfBuilderConf } /** - * Build a single page PDF + * Build a single page PDF with added listeners + * + * @param requesterTxId + * @param htmlContent + * @param cfg + * @param extraSpace + * @param context + * @return + * @throws IOException + */ + public byte[] htmlToPdf(String requesterTxId, String htmlContent, PdfBuilderConfig cfg, int extraSpace, SessionContext context) throws IOException { + return htmlToPdf(requesterTxId, htmlContent, cfg, true, extraSpace, null, context); + } + + /** + * Build a single page PDF with onetime listener to override added listeners * * @param requesterTxId * @param htmlContent @@ -170,7 +189,7 @@ protected byte[] htmlToPdf(String requesterTxId, String htmlContent, PdfBuilderC context.poi(BootPoi.PDF_BEGIN); PdfBuilderConfig.Agent agent = cfg.getAgent(); if (extraSpace < 1) { - extraSpace = 5; + extraSpace = 1; } final String sessionName = requesterTxId + "[" + agent + "]" + (isSinglePage ? ("SP+" + extraSpace + "mm") : "MP"); byte[] pdf = null;