Open RishabhSharma2906 opened 5 years ago
Hi, I am trying to convert a document in .docx containing some tables and text to .pdf format but I am getting this issue. Can anyone suggest what mistake I am making?
Below are the content of the build.gradle corresponding to generation of .docx file and converting it to pdf:- compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.9' compile group: 'org.apache.poi', name: 'poi', version: '3.9' compile group: 'fr.opensagres.xdocreport', name: 'org.apache.poi.xwpf.converter.pdf' , version: '1.0.6'
Hi, I generate word report to pdf with tables. Please check my pom.xml and test examples. Pom file: https://github.com/fochoac/report4j/blob/master/pom.xml.
Regards.
org.apache.poi.xwpf.converter.core.XWPFConverterException: java.lang.NullPointerException at org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:70) at org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:38) at org.apache.poi.xwpf.converter.core.AbstractXWPFConverter.convert(AbstractXWPFConverter.java:45) at com.teradata.tdm.pma.service.PDFReport.generateCurrentPdf(PDFReport.java:405) at com.teradata.tdm.pma.service.PDFReport.generatePDF(PDFReport.java:381) at com.teradata.tdm.pma.service.PDFReport.main(PDFReport.java:116) Caused by: java.lang.NullPointerException at org.apache.poi.xwpf.converter.core.MasterPageManager.visitHeadersFooters(MasterPageManager.java:200) at org.apache.poi.xwpf.converter.core.MasterPageManager.addSection(MasterPageManager.java:180) at org.apache.poi.xwpf.converter.core.MasterPageManager.compute(MasterPageManager.java:127) at org.apache.poi.xwpf.converter.core.MasterPageManager.initialize(MasterPageManager.java:90) at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitBodyElements(XWPFDocumentVisitor.java:232) at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.start(XWPFDocumentVisitor.java:199) at org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:56) ... 5 more