I had a look at the examples about ColumnText. I tried to make a simple
application using them. I encounter a strange problem. Here is the code :

ColumnText ct = new ColumnText(cb);
Phrase phr=new Phrase("Some text.\n\n", FontFactory.getFont(
FontFactory.HELVETICA, 12));
ct.addText(phr);
float[] left1  = {56,790, 56,52};
float[] right1 = {483,790, 483,52};
ct.setColumns(left1, right1);

ct.go(true);
ct.go();

If I try to simulate to add a Phrase, it'll never add anything after this,
even if I use ct.go(). Is my code wrong ?


2007/3/30, Bruno Lowagie (iText) <[EMAIL PROTECTED]>:

Vincent CAURIER wrote:
> Ok, it seems to be a "powerful" component, but I have a last question,
> before trying to implement ColumnText. Is it possible to remove an
> Element from a Document ?

No.

> Or is there a way to do it ?

You add the ColumnText in 'simulation mode'.
Meaning you 'pretend' to add the content in
order to get information about:
- the number of lines,
- the Y position,
- ...
If these values are OK to you, you add the
content to the ColumnText again, and you
decide if you add it to the current page,
or the next page.
This is all explained in chapter 7 of the book.
br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/




--
Vincent CAURIER
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to