diff --git a/fj-doc-mod-fop/src/main/java/org/fugerit/java/doc/mod/fop/PdfFopTypeHandler.java b/fj-doc-mod-fop/src/main/java/org/fugerit/java/doc/mod/fop/PdfFopTypeHandler.java index d6ae664c0..7b65da17e 100644 --- a/fj-doc-mod-fop/src/main/java/org/fugerit/java/doc/mod/fop/PdfFopTypeHandler.java +++ b/fj-doc-mod-fop/src/main/java/org/fugerit/java/doc/mod/fop/PdfFopTypeHandler.java @@ -3,6 +3,7 @@ import java.io.*; import java.nio.charset.Charset; import java.util.*; +import java.util.stream.Collectors; import javax.xml.transform.Result; import javax.xml.transform.Transformer; @@ -225,7 +226,7 @@ protected void handleConfigTag(Element config) throws ConfigException { log.info( "pdf a mode -> {} : {}", ATT_PDF_A_MODE, pdfAModConfig ); if ( VALID_PDF_A_MODES.contains( pdfAModConfig ) ) { this.setPdfAMode( pdfAModConfig ); - this.setFormat( StringUtils.concat( "_", pdfAModConfig, pdfUAModConfig ) ); + this.setFormat( StringUtils.concat( "_", Arrays.asList( pdfAModConfig, pdfUAModConfig ).stream().filter( s -> s!=null ).collect(Collectors.toList()) ) ); } else { throw new ConfigException( ATT_PDF_A_MODE+" not valid : "+pdfAModConfig+"( valid modes are : "+VALID_PDF_A_MODES+")" ); }