there is a error when use fr.opensagres.poi.xwpf.converter.pdf-gae convert word to pdf
cntigers opened this issue · comments
cntiger commented
there is a error when use fr.opensagres.poi.xwpf.converter.pdf-gae convert word to pdf;
the program code is :
try (ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayInputStream in = new ByteArrayInputStream(FileUtil.readBytes(new File("C:1.docx")))){
XWPFDocument xwpfDocument = new XWPFDocument(in);
PdfOptions pdfOptions = PdfOptions.create();
PdfConverter.getInstance().convert(xwpfDocument,out,pdfOptions);
FileUtil.writeBytes(out.toByteArray(),"c://1/pdf");
}catch (Exception e){
e.printStackTrace();
}
natimercy commented
cntiger commented