The width percentage is not used with absolute positioning. What you need is something like this (use onEndPage if possible):
PdfContentByte cb = writer.getDirectContent(); theTable.setTotalWidth(document.right() - document.left()); theTable.writeSelectedRows(0,-1,document.left(),document.top() + margin,cb); Best Regards, Paulo Soares ----- Original Message ----- From: "Justin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 31, 2002 21:55 Subject: [iText-questions] PdfPTable positioning > Hi, > I'm using the onStartPage to display a PdfPTable on every > page(similar to a header). I've increased the top margin size and I am > trying to set the absolute positioning of the PdfPTable using the > writeSelectedRows(), but I'm getting an error stating that the table > width must be greater than zero. My table width percentage is set to > 100, though. The code where I try to set the positioning looks like > this: > > PdfContentByte cb = new PdfContentByte(writer); > theTable.writeSelectedRows(0,6,0,200,cb); > doc.add(theTable); > > Do u see something wrong? > Thank you! ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
