Bug 56127 - if text have table and we fatch the text thru getText method in XWPFWordExtractor class than table content is coming in last
Summary: if text have table and we fatch the text thru getText method in XWPFWordExtra...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 3.9-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 13:47 UTC by Ravindra
Modified: 2014-02-11 15:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ravindra 2014-02-10 13:47:06 UTC
Hi,

if text have table in the contnet and we fatch the text thru getText method in XWPFWordExtractor class than table content is coming in last.

I was trying to convert Docx file to .txt file, i Have some tables in .docx files in middle of content.

when i trying to fecth Text thru getText method in XWPFWordExtractor class than in output table content was on last(if soppose to middle).

as i saw in code here table contnet is adding after all the content.

Iterator<XWPFTable> j = document.getTablesIterator();
		while(j.hasNext()) {
                        text.append(j.next().getText()).append('\n');
		}

Please let me know if we have any alternate to getText data as present in .docx file means table content will come at own position not at last.

Thanks,
Ravindra
Comment 1 Tim Allison 2014-02-11 01:36:36 UTC
Ravindra,
  Thank you for reporting this.  That issue was fixed by at least 3.10-beta2 (http://poi.apache.org/download.html#POI-3.10-beta2).  Give that a try and let us know if that doesn't meet your needs.
Comment 2 Ravindra 2014-02-11 14:57:22 UTC
Hi,

I checked, it is working fine with 3.10-beta2 version.
Thanks for your response.

Thanks
Comment 3 Dominik Stadler 2014-02-11 15:51:15 UTC
Resolving this issue based on previous comment.