Page 1 of 1

Hiding error messages in PDF output

PostPosted: Wed Apr 27, 2016 1:10 am
by Chadler
Hello
I've been developing a server-side webservice which goal is to convert several documents of different formats to PDF. I've chosen to use your library to convert specifically docx-files and successfully done so. However, some of them comes with error messages in the output PDF-files, for example "NOT IMPLEMENTED: support for w:pict - without v:imagedata" and "#TEXTBOX#".

I've come to understand you've not implemented support for drawing "Shapes" or "Drawing Canvas", but I haven't found a way to hide/remove these errors from the final PDF. I've searched for an answer but so far not found it.

I should also mention that I'm primarily a .NET developer and fairly new to Java, so if you could keep the feedback as basic as possible I'd appreciate it.

Thanks!

Re: Hiding error messages in PDF output

PostPosted: Wed Apr 27, 2016 11:11 am
by jason
To hide error messages in PDF via XSL FO (Docx4J.FLAG_EXPORT_PREFER_XSL)

Step 1: configure logging; easiest is to use log4j:

1a: add jars to your class path:

slf4j-log4j12-1.7.21.jar
log4j-1.2.17.jar

1b: add log4j.xml to your classpath; get a sample file from https://github.com/plutext/docx4j/blob/ ... /log4j.xml

Step 2: add the following to log4j.xml:

<logger name="org.docx4j.convert.out.common.AbstractConversionContext">
<level value="warn"/>
</logger>

Re: Hiding error messages in PDF output

PostPosted: Wed Apr 27, 2016 6:53 pm
by Chadler
Alright, I appreciate the help.

Thanks again!