Issue 466 in xdocreport: POI ERROR: Expecting one Styles document part, but found 0

1,070 views
Skip to first unread message

xdocr...@googlecode.com

unread,
Feb 23, 2015, 2:56:36 PM2/23/15
to xdocr...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 466 by rramos0...@gmail.com: POI ERROR: Expecting one Styles
document part, but found 0
https://code.google.com/p/xdocreport/issues/detail?id=466

What steps will reproduce the problem?
1. I have a word document, after
2. With POI I replace some text with other text and as specific tag for an
image, after
3. is generate a word document with new text and image
4. but when I convert the document to pdf type i got error:
org.apache.poi.xwpf.converter.core.XWPFConverterException:
java.lang.IllegalStateException: Expecting one Styles document part, but
found 0
at
org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:59)
at
org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:37)
at
org.apache.poi.xwpf.converter.core.AbstractXWPFConverter.convert(AbstractXWPFConverter.java:45)
at poi38.ooxmlToPDF.createPDF(ooxmlToPDF.java:53)
at poi38.ooxmlToPDF.main(ooxmlToPDF.java:18)
Caused by: java.lang.IllegalStateException: Expecting one Styles document
part, but found 0
at
org.apache.poi.xwpf.usermodel.XWPFDocument.getStyle(XWPFDocument.java:441)
at
org.apache.poi.xwpf.converter.core.styles.XWPFStylesDocument.<init>(XWPFStylesDocument.java:192)
at
org.apache.poi.xwpf.converter.core.styles.XWPFStylesDocument.<init>(XWPFStylesDocument.java:186)
at
org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.createStylesDocument(XWPFDocumentVisitor.java:161)
at
org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.<init>(XWPFDocumentVisitor.java:154)
at
org.apache.poi.xwpf.converter.pdf.internal.PdfMapper.<init>(PdfMapper.java:149)
at
org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:54)
... 4 more
Process exited with exit code 0.



What is the expected output? What do you see instead?
- A pdf file

What version of the product are you using? On what operating system?
- POI 3.8, xdocreport-1.0.4.jar, itext2.1.7.jar

Please provide any additional information below.

Although POI is modifying doc, I think that process poi is adding some
wrong, because I try convert to PDF i catch error.
If I open the document with microsoft office and remove image and insert
the same image and save, after the process run fine.




--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

xdocr...@googlecode.com

unread,
Feb 23, 2015, 2:57:37 PM2/23/15
to xdocr...@googlegroups.com

Comment #1 on issue 466 by rramos0...@gmail.com: POI ERROR: Expecting one
Please your kind help.

xdocr...@googlecode.com

unread,
May 1, 2015, 2:28:21 PM5/1/15
to xdocr...@googlegroups.com

Comment #2 on issue 466 by natape...@gmail.com: POI ERROR: Expecting one
Hello!
I have the same problem.
Did you solve it?

xdocr...@googlecode.com

unread,
May 1, 2015, 3:17:04 PM5/1/15
to xdocr...@googlegroups.com

Comment #3 on issue 466 by angelo.z...@gmail.com: POI ERROR: Expecting one
It's a problem with POI, please post to POI forum. Thanks.
Reply all
Reply to author
Forward
0 new messages