Skip to content

Commit

Permalink
[fj-doc-mod-fop] PdfFopTypeHandler now concat PDFA and PDFUA mode in …
Browse files Browse the repository at this point in the history
…format field if both present (i.e. 'PDF/A-1b_PDF/UA-1')
  • Loading branch information
fugerit79 committed Oct 25, 2024
1 parent d5ffcc5 commit fce089d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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+")" );
}
Expand Down

0 comments on commit fce089d

Please sign in to comment.