Что вызывает такое поведение? Что я могу сделать, чтобы это исправить? Документы: < /p>
Код: Выделить всё
public class Main {
public static void main(String[] args) throws Exception {
InputStream templateInputStream = new FileInputStream("document.docx");
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(templateInputStream);
Mapper fontMapper = new BestMatchingMapper();
wordMLPackage.setFontMapper(fontMapper);
OutputStream os = new FileOutputStream("document.pdf");
Docx4J.toPDF(wordMLPackage, os);
}
}
< /code>
Список зависимостей, которые у меня есть в образце проекта: < /p>
org.docx4j
docx4j-core
11.5.2
org.docx4j
docx4j-export-fo
11.5.2
org.docx4j
docx4j-JAXB-ReferenceImpl
11.5.2
org.apache.xmlgraphics
fop
2.10
Подробнее здесь: https://stackoverflow.com/questions/794 ... bered-list