First off I'm new to using itext.
Hear is my issue and I will try to be as explicit as I can.
I overrode the onEndPage() method of PdfPageEventHelper, where I created a PdfTemplate, which will house my header data and display this info on every page. This is where itext recommends placing code for complex headers.
This PdfTemplate uses absolute positioning to place itself and its components at the top of the document.
Code excerpt:
try {
template.moveTo(0, 200);
template.lineTo(595, 200);
template.moveTo(200, 100);
template.beginText();
template.showTextAligned(PdfContentByte.ALIGN_LEFT, lab, 0, 190, 0); template.showTextAligned(PdfContentByte.ALIGN_LEFT, division, 0, 180, 0);............. blah,blah,blah
The document displays the header correctly on each page.
I now need to query the data from the database and add it to the document. My first though is to put the data in a Paragraph object. The Paragraph object handles pagination correctly that is why I choose it. When I put the data in a Paragraph and add the Paragraph to the document, the data displays from the top of the page, not from the end of the header as I would expect (although it does paginate correctly). I cannot use absolute positioning to place the Paragraph where I need it because, apparently, this is done dynamically with itext.
I tried using a PDFtable which allowed me to use absolute positioning to place the table below the header but once the data reached the end of the page it no longer dispalyed. I would expect the data would spill over to a new page with the header being displayed along with the data (this is what a Paragraph does). In other words the PTFtable did not paginate as I expected.
So, what object do I use in my document to be able to use absolute positioning and then display all my data even if it spills over one or more pages? What object will paginate correctly using absolute correctly.
Thanks
On the road to retirement? Check out MSN Life Events for advice on how to get there! ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
