Skip to content

Commit

Permalink
[app][fix] propagate debug render arg close #60
Browse files Browse the repository at this point in the history
  • Loading branch information
M3ssman committed Nov 6, 2024
1 parent 00136e7 commit 42f895a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public DerivansConfiguration(DerivansParameter params) throws DigitalDerivansExc
}

// determine if debug render for PDF required
if (params.getDebugPdfRender()) {
if (Boolean.TRUE.equals(params.isDebugPdfRender())) {
this.debugPdfRender = Boolean.TRUE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,8 @@ public void setNamePDF(String namePDF) {
this.namePDF = namePDF;
}

public Boolean getDebugPdfRender() {
if (debugPdfRender == null) {
debugPdfRender = Boolean.FALSE;
}
return debugPdfRender;
public Boolean isDebugPdfRender() {
return debugPdfRender != null;
}

public void setDebugPdfRender(boolean isRequired) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ private PDFElement render(BaseFont font, int pageHeight, PdfContentByte cb, ICha
if (this.debugRender) {
LOGGER.trace("put '{}' at {}x{} (fontsize:{})", text, x, v, fontSize);
}
// propably hide text layer font
if (this.renderModus.equalsIgnoreCase("invisible")) {
// hide text layer if configured and *not* in debugMode
if ((!this.debugRender) && this.renderModus.equalsIgnoreCase("invisible")) {
cb.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_INVISIBLE);
}
// rendering depends on text orientation
Expand Down

0 comments on commit 42f895a

Please sign in to comment.