You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using fr.opensagres.poi.xwpf.converter.pdf version 2.0.4 with apache poi 5.2.5
This is the error I am getting
Converting DOCX to PDF...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.lowagie.text.pdf.MappedRandomAccessFile$1 (file:/~/.m2/repository/com/lowagie/itext/2.1.7/itext-2.1.7.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.lowagie.text.pdf.MappedRandomAccessFile$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Failed to generate PDF
I could change the dependency to fr.opensagres.poi.xwpf.converter.pdf.itext5
but then I am getting Class not Found PdfConverter
This is my code example
/** * Converts a DOCX file to PDF using XDocReport API. * * @param inputFileName The input file name (full path). */staticpublicvoidconvertToPDF(StringinputFileName, StringoutputFileName) {
// Set the output file namesStringoutputNamePDF = changeFileExtension(outputFileName, "pdf");
try ( // Open the input fileInputStreamdocStream = newFileInputStream(newFile(inputFileName));
// Create a new DOCX document from the input streamXWPFDocumentdocument = newXWPFDocument(docStream);
// Create an output stream for the ODT fileFileOutputStreampdfStream = newFileOutputStream(newFile(outputNamePDF));) {
// Convert the DOCX to PDFIJ.log("Converting DOCX to PDF...");
// Instantiate the converter optionsPdfOptionsoptionsPDF = PdfOptions.create();
// Instantiate the converterIXWPFConverter<PdfOptions> converter = PdfConverter.getInstance();
// Convert the document to PDFconverter.convert(document, pdfStream, optionsPDF);
} catch (Exceptione) {
IJ.log("Failed to generate PDF: " + outputNamePDF);
IJ.log(e.getMessage());
}
}
Am I doing something wrong or is this a bug??
The text was updated successfully, but these errors were encountered:
Changing the dependency to fr.opensagres.poi.xwpf.converter.pdf.openpdf it works for template files (no images nor tables)
But it shows java.lang.NullPointerException on final reports. That's it, nothing more in the log file even when I log all exceptions.
I am using fr.opensagres.poi.xwpf.converter.pdf version 2.0.4 with apache poi 5.2.5
This is the error I am getting
I could change the dependency to
fr.opensagres.poi.xwpf.converter.pdf.itext5
but then I am getting Class not Found PdfConverter
This is my code example
Am I doing something wrong or is this a bug??
The text was updated successfully, but these errors were encountered: