Page 1 of 1

Read all the condent from docx

PostPosted: Wed Aug 27, 2014 9:10 pm
by munaverbasha
Hi ,

I need to read all the contents and their styling properties from docx and how to find the content type(like whether is this content is Paragraph or Table or any other type) using docx4j. please help me out. thanks in advance.

Re: Read all the condent from docx

PostPosted: Wed Aug 27, 2014 10:53 pm
by munaverbasha
Hi ,

I need to extract all the contents one by one with out changinf the order(for example the word document contains paragraph,table paragraph,list means, i will extarct all the content first paragraph then table then paragraph ... likewise) and also extarct the content properties(like font family, content style....). I go through the Docx4j_Getting started document and learned Traversing a document but i did not get the code level idea. please any one help me out. thanks in advance...

Re: Read all the condent from docx

PostPosted: Thu Aug 28, 2014 12:09 pm
by jason

Re: Read all the condent from docx

PostPosted: Thu Aug 28, 2014 3:58 pm
by munaverbasha
Hi ,

Yes , I tried.. but this one not satisfy my requirements. my objective is extract all the contents from docx and their styling formats also with out changinf the order that means, i will read the content from docx as a sequence. please help me out. thanks in advance.

For example:

word docx contains first 2 paragraph then 1 list, then 1 table 1 image then 1 table ......
I will extarct first 2 paragraph and their styling formats the list then table then image like wise.....

Re: Read all the condent from docx

PostPosted: Fri Aug 29, 2014 8:42 pm
by jason
That sample does visit all the content in document order, or "as a sequence" (as you put it).

Please take the time to understand it before replying.