On Wed, Mar 24, 2010 at 02:34:13PM +0530, Rajesh Marathe wrote:
Hello Corvid,
You hit the nail on its head. I will definitely use iterators to iterate on the words on a page. I do have the code with me which is based on findtext.cc as mentioned by Johannes. But, using iterators I can move to a word on a page. But to get its style, I still need to access the "x_link" variable which is in the class Textblock. Therefore, my understanding was to use both iterator class and the Textblock class as well.
However, after seeing your email I get a feeling that my understanding might be incorrect. So, right now, my problem is not in using iterators (Which I intend to do anyways) but getting the x_link variable which is in Textblock class. Please let me know where am I wrong.
Ah, I think I see your problem now. Iterators have the getContent() method, but Content does not include the style and therefore not the x_link. I'd say we should enhance the Iterator interface to make it possible to get the style somehow. However I don't know yet what would be the best way to do it. corvid, what do you think? Cheers, Johannes