Open valex128 opened 7 years ago
Using next java-code for converting:
DocumentKind documentKind;
switch (mimeType) {
case ODF: {
documentKind = DocumentKind.ODT;
break;
}
case XWPF: {
documentKind = DocumentKind.DOCX;
break;
}
default:
throw new RuntimeException("Unsupported mimetype");
}
Options options = Options.getFrom(documentKind).to(ConverterTypeTo.PDF);
IConverter converter = ConverterRegistry.getRegistry().getConverter(options);
converter.convert(documentStream, pdfStream, options);
with configuration in pom.xml
<artifactId>fr.opensagres.xdocreport.converter.docx.xwpf</artifactId>
<version>1.0.6</version>
There are found few problems with docx conversation. All issues putted into one sample docx, and when it convert to pdf.
You can found it on google folder: https://drive.google.com/drive/folders/0B8lh2rOFt1iYT0tNMkExLWl6ZWc?usp=sharing