Hi,

Thanks. I have a confession to make...I was wrong about how the tables were
being wrapped into the parent table. It was wrapping multiple pairs of the
header and content tables into one parent. 

So, as it turns out the keepTogether( boolean) WAS the correct solution -- I
just needed to wrap the header and content tables in another PDFPTable
object that would wrap each pair and set the setKeepTogether value to true:

childTable.addCell(headerTable); // new childTable
childTable.addCell(contentTable);
childTable.setKeepTogether(true); // set this to 'true'. keeps the
headerTable and contentTable from
                                // splitting across pages.                      
parentTable.addCell(childTable);

Thanks again for your help and patience,

Geo



1T3XT info wrote:
> 
> Geo66 wrote:
>> So how do I force iText to start printing that particular table to the
>> next
>> page? What is the function or method that I use?
> 
> OK, once you've done the math as described in my previous answer,
> you have to decide:
> 
> if (the header doesn't fit)
>    document.newPage();
> document.add(table);
> -- 
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
> _______________________________________________
> 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/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-keep-two-child-tables-together-within-parent-table-tp23666655p23788018.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
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