Open alexz0000 opened 7 years ago
I have the same issue. Any help?
Same problem. Anyone solved?
I faced the same problem, but by diving into the source code and debugging it found the cause. In my case, the converter was trying to break a word inside a table column because it was too long: text.go(true) was returning constant value "2" (have no idea why and did not look for the reason), therefore the method columnBreak() was invoking infinitely. Check it, maybe you need to just increase your column width. I hope it will work for you too!
Same problem when processing picture inside a PDF
Confirm problem will occur when docx has big table or image.
When image is too height, this may occur. Just resize the image will fix it.
In my case, i was generating a docx file (using org.apache.poi', name: 'poi-ooxml-schemas', version: '4.1.2') and then converting it to pdf using ('fr.opensagres.xdocreport', name: 'fr.opensagres.poi.xwpf.converter.pdf', version: '2.0.2') protected XWPFDocument document = new XWPFDocument();; XWPFTable table = document.createTable(numRows + 1, numCols); XWPFTableRow r = table.getRow(i + 1);
r.setRepeatHeader(true); <<<< This was creating the problem when converting from docx to pdf I believe this tries to set a header row in each page when a long table spans multiple pages.
My file is asdfb-206.docx When I tried to convert it to PDF, got stackoverflowerror. [12-26 02:47:33.950 UTC] [NOTICE] [ERROR] [pool-3-thread-1:sbtest01#santaba#reportsoa#709#1482720433:reporting:table_max_1_709] [BaseReportTask.call:205] CAUSE=Encountered exception, ACTION=Fail, CONTEXT=reportName=table_max_1, reportId=709, EXCEPTION=null java.lang.StackOverflowError at fr.opensagres.xdocreport.itext.extension.ExtendedPdfPTable.getRowHeight(ExtendedPdfPTable.java:101) at fr.opensagres.xdocreport.itext.extension.ExtendedPdfPTable.getRowHeight(ExtendedPdfPTable.java:76) at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source) at com.lowagie.text.pdf.ColumnText.go(Unknown Source) at com.lowagie.text.pdf.ColumnText.go(Unknown Source) at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source) at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source) at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source) at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source) at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source) at com.lowagie.text.pdf.ColumnText.go(Unknown Source) at com.lowagie.text.pdf.ColumnText.go(Unknown Source) at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source) at com.lowagie.text.pdf.PdfDocument.add(Unknown Source) at com.lowagie.text.Document.add(Unknown Source) at fr.opensagres.xdocreport.itext.extension.ExtendedDocument.add(ExtendedDocument.java:114) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.flushTable(StylableDocument.java:345) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.pageBreak(StylableDocument.java:128) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.columnBreak(StylableDocument.java:107) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.simulateText(StylableDocument.java:211) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.pageBreak(StylableDocument.java:147) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.columnBreak(StylableDocument.java:107) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.simulateText(StylableDocument.java:211) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.pageBreak(StylableDocument.java:147) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.columnBreak(StylableDocument.java:107) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.simulateText(StylableDocument.java:211) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.pageBreak(StylableDocument.java:147) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.columnBreak(StylableDocument.java:107) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.simulateText(StylableDocument.java:211) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.pageBreak(StylableDocument.java:147) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.columnBreak(StylableDocument.java:107) at org.apache.poi.xwpf.converter.pdf.internal.elements.StylableDocument.simulateText(StylableDocument.java:211)
Is there someone could help me? I'm very hurry on it. Thank you.