My solution is to set the document top margin at three times the default, then subtract a value when positioning the header.
(at class level) private static float marginIncrement = 36; (in page event) table.writeSelectedRows(0, -1, document.leftMargin(), page.height() - (document.topMargin() - marginIncrement) + table.getTotalHeight(), writer.getDirectContent()); (in main method) Document doc = new Document(PageSize.A4.rotate(),marginIncrement,marginIncrement,marginIncrement*3,marginIncrement); >From: David McDivitt <[EMAIL PROTECTED]> >Date: Tue, 01 Feb 2005 11:21:33 -0600 > >Thanks Paulo for your help. It's wonderful iText exists and you support it >the way you do. > >I noticed some bugs when I place a table in the header using events. If I >place an extra blank row at the bottom of the table, the first row gets >chopped off at page top. Only half of the first row will print. Correct >spacing is given between the header and the rest of the document. If I give >a blank row at the top it is ignored. > >I am working now to get the header to position properly. It comes out too >close to the top of the page, probably at absolute zero for printable page ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
