Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions README_中文.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.summerboot</groupId>
<artifactId>jexpress</artifactId>
<version>2.7.5-SNAPSHOT</version>
<version>2.7.5</version>
<packaging>jar</packaging>
<name>jExpress ${project.version}</name>
<description>jExpress focuses on addressing non-functional and operational maintainability needs, some of which Spring Boot may not yet provide.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public boolean removeListener(SinglePageHeightCalculationListener listener) {
return listeners.remove(listener);
}

public List<SinglePageHeightCalculationListener> getListeners() {
return List.copyOf(listeners);
}

public boolean isDumpEnabled() {
return BootConstants.isDebugMode() && dumpDir.exists();
}
Expand All @@ -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
Expand All @@ -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;
Expand Down
Loading