Closed Xiaoshu-Zhao closed 4 months ago
Thanks @Xiaoshu-Zhao !
I am having the same problem when trying to convert an Apache POI document to PDF with the method:
private byte[] createPdf(XWPFDocument document) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
PdfOptions options = PdfOptions.create();
document.enforceReadonlyProtection();
try {
PdfConverter.getInstance().convert(document, byteArrayOutputStream, options);
} catch (IOException e) {
throw new RuntimeException("Pdf converter failed", e);
}
return byteArrayOutputStream.toByteArray();
}.
Will this fix also work for PDFs? And will this fix be released soon? Have a good day.
fix the NullPointerException issue. for issue detail please check https://github.com/opensagres/xdocreport/issues/637