Error on convert pdf with FO on docx4j.3.3.1
Posted: Fri Aug 26, 2016 12:58 am
Hello,
I'm trying to convert a .docx to .pdf
When the method the code
java.lang.NoSuchMethodException: org.apache.fop.apps.FopFactory.newInstance ()
at java.lang.Class.getDeclaredMethod (Class.java:2130)
I am using all the libs from folder dependencies and optional/export-fo, as recommended.
In debug I realized that AbastractExporter in export method throws the exception when you try to get the path of fosettings. The method does not find the hasmap and when trying to access fo_dump_file and converts it into File, the error occurs -
Another thing I noticed is that before running the AbstractExporter.export method, code
the hash map with the path to the settings was there.
Please does anyone know what I'm doing wrong?
I'm trying to convert a .docx to .pdf
When the method the code
- Code: Select all
Docx4J.toFO(foSettings, the, Docx4J.FLAG_EXPORT_PREFER_XSL);
java.lang.NoSuchMethodException: org.apache.fop.apps.FopFactory.newInstance ()
at java.lang.Class.getDeclaredMethod (Class.java:2130)
I am using all the libs from folder dependencies and optional/export-fo, as recommended.
In debug I realized that AbastractExporter in export method throws the exception when you try to get the path of fosettings. The method does not find the hasmap and when trying to access fo_dump_file and converts it into File, the error occurs -
- Code: Select all
Public File getFoDumpFile () {
return (File) settings.get (FO_DUMP_FILE);
}
Another thing I noticed is that before running the AbstractExporter.export method, code
- Code: Select all
process (conversionSettings, conversionContext, intermediateOutputStream);
the hash map with the path to the settings was there.
Please does anyone know what I'm doing wrong?