我在寻找到docx
文件转换为Java中pdf
的最佳方式,这是我已经试过:如何.docx文件转换为pdf在Java中
File wordFile = new File("wordFile.docx"), target = new File("target.pdf");
IConverter converter;
Future<Boolean> conversion = converter.convert(wordFile)
.as(DocumentType.MS_WORD)
.to(target)
.as(DocumentType.PDF)
.prioritizeWith(1000) // optional
.schedule();
的问题是,我在程序中找不到IConverter类...
你可以给我链接下载documents4j jar文件吗? –
我已经用所需的信息编辑了我的答案。 –
这是什么:“DocumentType.MS_WORD”和“DocumentType.PDF”它不起作用 –