I have these message on all converted files to PDF via Docx4j.
TO HIDE THESE MESSAGES, TURN OFF log4j debug level logging fororg.docx4j.convert.out.pdf .viaXSLFO
Is it possible to hide it? I found some solution here on Stack but It didn't help me because my application is simple. I used this code and put it in my application.
long start = System.currentTimeMillis();
// 1) Load DOCX into WordprocessingMLPackage
File file = new File(sFiles.getAbsolutePath());
InputStream is = new FileInputStream(file);
String name=file.getName();
String destination= file.getAbsolutePath();
String outDestination=file.getParent();
String fileType=FilenameUtils.getExtension(destination);
String name1=name.replaceAll(fileType, "");
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage
.load(is);
System.out.println(name);
// 2) Prepare Pdf settings
PdfSettings pdfSettings = new PdfSettings();
// 3) Convert WordprocessingMLPackage to Pdf
wordName=outDestination+"\\"+name1+"pdf";
FileOutputStream out = new FileOutputStream(wordName);
PdfConversion converter = new org.docx4j.convert.out.pdf.viaXSLFO.Conversion(
wordMLPackage);
converter.output(out, pdfSettings);
System.err.println("Generate pdf/Resume.pdf with "
+ (System.currentTimeMillis() - start) + "ms");