diff --git a/engines/misc/src/main/java/org/alfresco/transform/misc/transformers/TextToPdfContentTransformer.java b/engines/misc/src/main/java/org/alfresco/transform/misc/transformers/TextToPdfContentTransformer.java index 678f5c424..14d8c797e 100644 --- a/engines/misc/src/main/java/org/alfresco/transform/misc/transformers/TextToPdfContentTransformer.java +++ b/engines/misc/src/main/java/org/alfresco/transform/misc/transformers/TextToPdfContentTransformer.java @@ -165,7 +165,7 @@ public void transform(final String sourceMimetype, final String targetMimetype, } String pdfFontSize = transformOptions.get(PDF_FONT_SIZE); Integer fontSize = null; - if (pdfFontSize != null) + if (pdfFontSize != null && !pdfFontSize.isBlank()) { try { @@ -173,8 +173,8 @@ public void transform(final String sourceMimetype, final String targetMimetype, } catch (Exception e) { - logger.error("Error parsing font size {}, going to set it as {} : {}", fontSize, DEFAULT_FONT_SIZE, e.getMessage()); fontSize = DEFAULT_FONT_SIZE; + logger.error("Error parsing font size {}, going to set it as {} : {}", pdfFontSize, fontSize, e.getMessage()); } }