我正在尝试使用 xdocreport 将 docx 转换为 pdf,但最终我发现 IRunBody 类的 classnot found 异常。我的包 'org.apache.poi.xwpf.usermodel' 似乎没有这个接口。我有所有需要的罐子。poi,poi-ooxml,poi-ooxml-schemas,但我无法获得这个类。谁能让我知道我在这里想念什么?我需要添加任何其他罐子吗?下面是我正在运行的代码
XWPFDocument xwpfDoc = new XWPFDocument(new FileInputStream(fileName));
PdfOptions options = PdfOptions.create().fontEncoding("windows-1250");
String randomFilename = UUID.randomUUID().toString();
String outputFIlePath = TEMPORARY_PDF_FILE_LOCATION + randomFilename + ".pdf";
OutputStream output = new FileOutputStream(outputFIlePath);
PdfConverter.getInstance().convert(xwpfDoc, output, options);