Laurent wrote:
> Hi everyone,
> 
> I'm new to iText, using iText 2.1.7 on Java 5 and 6.
> When I'm adding elements to a ColumnText and no more space is available,
> so calling go() does not return NO_MORE_TEXT. Then I call clearChunks(),

Huh? What method is that?
O... I see, it's in the API docs...
Writing code using API docs is fine if you already know the product,
but you really should read chapter 7 about ColumnText.
Clearing the content of a column is done like this:
column.setContent(null);

> which, from my understanding, remove the extra data that was left out due
> to the lack of space. So then, by calling go() again I should get
> NO_MORE_TEXT (as written in the javadoc) but it's not the case.

It's not because I've finally thrown away the old tutorial,
that you shouldn't read the other documentation ;-)

> Am I not understanding something correctly or is there a bug here? (I had
> a quick look at the source code and I think that, in clearChunks(), in case
> of "composite", "compositeColumn" should also be cleared (but I'm only
> guessing here)).

The Javadoc info should be updated.
Use setText(null); and you'll have an empty column.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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