最近在找word转pdf的方法,我是使用 poi制作的word
在网上发现两个依赖
<!-- 依赖一 -->
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>fr.opensagres.poi.xwpf.converter.pdf</artifactId>
<version>2.0.2</version>
</dependency>
<!-- 依赖二 -->
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>org.apache.poi.xwpf.converter.pdf</artifactId>
<version>1.0.6</version>
</dependency>
//1.加载poi 的docx文档
XWPFDocument document = new XWPFDocument(new FileInputStream(file));
//2. 将docx 文档转换为pdf
File outFile = new File(targetPath);
OutputStream out = new FileOutputStream( outFile );
//PdfOptions options = null;
//PdfOptions options = PdfOptions.create().fontEncoding( "windows-1250" );
PdfConverter.getInstance().convert( document, out, null);
我在网络上找不到这两个依赖的介绍,所以我想知道
提前感谢各位同学的帮助