iText PdfPTables, document.add with writeSelectedRows

Posted by J2SE31 on Stack Overflow See other posts from Stack Overflow or by J2SE31
Published on 2010-05-05T13:43:00Z Indexed on 2010/05/17 6:30 UTC
Read the original article Hit count: 843

Filed under:
|
|
|

I am currently modifying an existing system that generates reports with iText and java. The report template is as follows:

Header1(PdfPTable)
Header2(PdfPTable)
Body(PdfPTable)

I am currently using the writeSelectedRows to display Header1 and Header2, but document.add is used to display the Body. The problem is that the system is setup to write the headers AFTER the body has already been displayed on the screen, so I am displaying my headers on top of my body content. My question is how do I add my body table (using document.add) and have it display about halfway down the page (or any predetermined vertical position)? This way I would have sufficient room to display my headers above the body table.

Note: I believe the body table is using document.add to facilitate automatic paging if the body content is too large.

© Stack Overflow or respective owner

Related posts about java

Related posts about itext