Hi Swapna,

2009/7/23 Swapna Matanam <[email protected]>

>
> Hello team,
>
> I have a PDF which has text in the form of paragraphs( with underlining for
> some tet and some text may be bold)  and tables. I want to read that PDF in
> sequential order. So how will i know whether the section that i am going to
> read is a table or a paragraph or a text.
>
> As of now i am using the following code.But it is taking everything as text
> i guess, hence i am not able to read the tables, underlined text and all.
>
> *for* (*int* i = 1; i <= reader.getNumberOfPages(); i++)
>                          {
>                                  hg = hg + h.getTextFromPage(i);
>
>                                         *if* (-1 != hg.indexOf("XYZ")
>                                         {
>
> hg=hg.replaceAll("XYZ","ABC");
>                                         }
>
>                         }
>
> Can someone please help me in this regard.
>

Please first get familiar with PDL, what it means and what it implies [1].

Moreover, it appears that you intend to edit a PDF file by replacing text.
And I guess you expect the content reflow after the replacement. This is NOT
possible, be it with iText or any other 3rd party librairy [2]

Cheers,
alexis

[1] http://1t3xt.info/tutorials/faq.php?branch=faq.pdf_in_general&node=pdl
[2]
http://1t3xt.info/tutorials/faq.php?branch=faq.pdf_in_general&node=replace_word
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to