Bruno Lowagie <bruno <at> lowagie.com> writes: > > linhda wrote: > > >Hello everyone, > > > >In my code, console shows that error when I run following line code: > > > >bottom = table.bottom(); > > > >Could you please explain briefly for me about that Error? > > > Table extends Rectangle, so it also has the bottom() method. > However: as you are constructing the table, iText only knows > about its CONTENT, nothing about its REPRESENTATION. > The representation only comes in to play once you add the table > to a document at which time all positional calculation is done. > That's why the bottom() method throws an UnsupportedOperationException. > > Please explain on the mailinglist why you need to know the bottom > position of the table. Depending on your more specific question, > we will be able to point you in the right direction. > > In the meanwhile, it doesn't hurt to read these tutorial chapters: > http://itextdocs.lowagie.com/tutorial/objects/tables/ > http://itextdocs.lowagie.com/tutorial/objects/tables/pdfptable/ > br, > Bruno
Hello Bruno, I would like to have a PDF document with all tables. And I used following line code: table.setTableFitsPage(true); table.setOffset(28); The first table of the first page takes an offset 28 from the top. But the first tables of other( second, third ...) pages do not, instead the offset is 0. For example: I have 5 tables in my PDF file, 4 tables are in first page and the fifth is in second page, document.top() = 30, offset = 28. The first table is 28 far from the top. But the fifth table is 0 far from the top. I would like to have the fifth table is also 28 pixels far from the top. I tried to use bottom() to solve the problem. But it did work as I expected. Could you please help me with another better way? Thank you very much for your time. Regards, Linhda ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions