setKeepTogether() will work in ColumnText and PdfPtable. You may have
problems with Table, though.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Eric ...
> Sent: Thursday, March 10, 2005 4:08 PM
> To: [email protected]
> Subject: [iText-questions] Keep together, Chunk
> 
> I would like to have a chunk that fits on the same page. Seems that
> setKeepTogether() doesn't work in this case. Anyone has an 
> idea for this
> problem ?
> One another question : I see "setKeepTogetherWithNext()" for 
> the RTF, is there
> the same for the PDF ?
> 
> Here's my code :
> 
> cell = new Cell( prgph = new Paragraph( getChunkedPhrase( 
> TABLE_LEADING+1f, new
> Object[] { new Chunk( " \" Here \" \n\n\n There", generalFont 
> ) } ) ) );
> prepareBorder( cell, Rectangle.BOX, 0.5f, Color.black );
> cell.setHorizontalAlignment( Element.ALIGN_LEFT );
> prgph.setAlignment( Element.ALIGN_LEFT );
> prgph.setKeepTogether(true);
> table.addCell(cell);
> 
> 
> Result :
> 
> ------------------------
> |"Here"                |
> |                      |
> |                      |
> - page break -
> ------------------------
> |                      |
> |"There"               |
> |                      |
> ------------------------
> 
> 
> Regards, Eric
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to