Title: Message
OK, I think I understand it better now: ColumnText is a lower-level object, and does not posess enough information to honor the keepTogether attribute. Your suggested solution is similar to what I have implemented.
 
Thanks,
 
-Dave Martin
 
 
-----Original Message-----
From: Paulo Soares [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 9:58 AM
To: David Martin; [EMAIL PROTECTED]
Subject: RE: [iText-questions] Paragraph keepTogether and ColumnText

ColumnText only uses the chunks inside a Phrase/Paragraph, it doesn't use any of the other attributes such as leading or keepTogether. To achieve the same effect do:
 
ColumnText ct = ...; //the text and position is loaded
ColumnText ct2 = ColumnText.duplicate(ct);
if ((ct2.go(true) & ColumnText.NO_MORE_TEXT) != 0) {
    ct.go(); //ok to place text, it fits
}
else {
    // move the text to somewhere else
}
 
Best Regards,
Paulo Soares
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Martin
Sent: Monday, April 19, 2004 5:47 PM
To: [EMAIL PROTECTED]
Subject: [iText-questions] Paragraph keepTogether and ColumnText

Hi,
 
Paragraph's keepTogether attribute has no effect when adding the paragraph to a ColumnText. I filed a bug on this, which was closed as 'not a bug'. Could you explain?
 
Thanks,
 
-Dave Martin

Reply via email to