Perhaps I don't understand the use of PdfPTableEvent well enough. If my table spans multiple pages, how can I use the information in the PdfPTableEvent to determine the appropriate borders? Can I use the canvas to write across previous pages? If so, then perhaps this would be better, although the changes to allow PdfPTable to have a border also seem fairly simple. Here is what I did to evaluate this:
In PdfPTable.writeSelectedRows(int colStart, int colEnd, int rowStart, int rowEnd, float xPos, float yPos, PdfContentByte[] canvases), I added the following at the very end: setLeft(xPos); setRight(xPos + getTotalWidth()); setTop(yPosStart); setBottom(yPos); Rectangle borderRect = new Rectangle(this); if (hasPreviousSubtables) { borderRect.disableBorderSide(Rectangle.TOP); } if (hasMoreSubtables) { borderRect.disableBorderSide(Rectangle.BOTTOM); } canvases[LINECANVAS].rectangle(borderRect); Note the new members hasPreviousSubtables and hasMoreSubtables (names debateable). Other small changes to make sure new Rectangle properties are copied appropriately. In ColumnText (starting at line 1279 of my version) I added: if (listIdx > 0) { nt.hasPreviousSubtables = true; } if (k < table.size()) { nt.hasMoreSubtables = true; } this is right before the line: nt.writeSelectedRows(0, -1, x1, yLineWrite, canvas); This seems fairly straightforward, but I don't quite follow all of the ColumnText code, so I may be missing something important. If this is something you would like to pursue, then I need to make some small changes to accomodate the variable width border code I am using. I can do that and send you the two updated files. > ----- Original Message ----- > From: "Paulo Soares" <[EMAIL PROTECTED]> > To: "Steve Appling" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, September 21, 2004 12:40 PM > Subject: RE: [iText-questions] PdfPTable borders > > You have PdfPTableEvent that it's a lot more flexible. How would you > implement the new border model? > >Best Regards, >Paulo Soares ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions