PdfPTable has no connection with Document. How do you it to know the
page size?



Good point.. I didn't think of that.

The page width is (document.right() - document.left()) but your logic
will only work if using writeSelectedRows().


Which when I look at the javadoc isn't overly clear to me how to use it. And somewhat complex to the overall need of what I'm trying to do, and that is calculate the number of cells that will fit in a table that will fill a page.


If you use Document.add()
the split may be done in other ways.



So if I use a "simple" method of opening a doc, writing the table until it no longer fits using


while( writer.fitsPage(tbl) ) {

}

and then deleting the file.. it's fairly straightforward and seems to be giving me the expected results, whereas I just tried the setTotalWidth() and it didn't work, and writeSelectedRows() seems to complicated, to simply work out the number of cells taht will fit in a page.


The reason for all this is simple, I'm writting top to bottom, left to write.


I saw that column text would probably work well too, so maybe I should go that way.

Pete.


------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to