I am trying to extract the text within individual textboxes in HWPFDocument,
but I can get the text from all text boxes combined together.

 

How to do this please suggest me.

>From the below code I can get text in all textboxes but how to find which
textbox has how many content.

 

 

                                int ps =
wordDocument.getMainTextboxRange().numParagraphs();

                                for (int p = 0; p < ps; p++) {

                                                Paragraph paras =
wordDocument.getMainTextboxRange().getParagraph(p);

                                                int cs =
paras.numCharacterRuns();

                                                for (int c = 0; c < cs; c++)
{

                                                                CharacterRun
chrs = paras.getCharacterRun(c);

                                                                char[] chars
= chrs.text().toCharArray();

                                                                if
(chrs.text().charAt(0) == '\r') {

                                                                }


                                                }

                                }

 

Thank You

SHIVA KUMAR K R

Phone : +91 9844831440

Linkedin :  <http://in.linkedin.com/in/shivakumarkr/> shiva_kumar_k_r

 

Reply via email to