You must use PdfPTable and page events. See the example headers_and_watermarks.java at itextpdf.sf.net.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of David McDivitt > Sent: Tuesday, February 01, 2005 12:12 AM > To: [email protected] > Subject: Re: [iText-questions] use table in header > > I can almost get a table to work with the following: > > Phrase ph = new Phrase(); > ph.add(new Chunk("MMIS Report XXXX")); > ph.add(new Chunk("KidCare Application Profile")); > ph.add(new Chunk("Household ID# "+rsA.getString("APPL_ID").trim())); > ph.add(Chunk.NEWLINE); > ph.add(new > Chunk(ToolsMisc.shortTimestamp(rsA.getTimestamp("UPDT_TST")))); > ph.add(new Chunk("")); > ph.add(new Chunk("[ ] 3089 Found")); > ph.add(Chunk.NEWLINE); > HeaderFooter hf = new HeaderFooter(ph,false); > hf.setBorder(0); > doc.setHeader(hf); > doc.open(); > > Is there some way to set the phrase width similar to a table, > then, can > alignment be set for each of the chucks? Thanks > > > >From: David McDivitt <[EMAIL PROTECTED]> > >Date: Mon, 31 Jan 2005 16:07:08 -0600 > > > >I must add a header to the PDF and the header must be a > table. I've spent > >all day and cannot figure out how. I am not using PdfP > objects but just > >plain objects: Table and not PdfPTable. > > > >Through trial and error I found out a command such as: > > > > doc.setHeader(new HeaderFooter(new Phrase("xx"),false)); > > > >must come before doc.open(); . I need the page header to have a table > >instead of a phrase. Help would be appreciated. Thanks > > > > ------------------------------------------------------- > 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 > ------------------------------------------------------- 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
