A PdfPTable is more versatile than a table. You can place it at absolute
positions. To remove borders for a PdfPCell you can call a custom function
like
private static void disableBorders(PdfPCell cell)
{
cell.disableBorderSide(PdfPCell.LEFT);
cell.disableBorderSide(PdfPCell.RIGHT);
cell.disableBorderSide(PdfPCell.TOP);
cell.disableBorderSide(PdfPCell.BOTTOM);
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John M.
Gabriele
Sent: Tuesday, July 12, 2005 12:46 AM
To: [email protected]
Subject: [iText-questions] Table vs. PdfPTable, Cell vs. PdfPCell; and
removing borders.
What's a good rule of thumb for deciding whether to use
a Table or a PdfPTable?
I need to put a table up with no borders. The dimensions
are fixed (1 row, 3 columns).
I also need to remove all borders from it -- so the text is
just floating there. :) I see that I can use a Table and
then setBorderWidth( 0 ) to remove that one big border around
the entire table. Can I do something similar with the PdfPTable?
I also need to remove the borders from the individual cells
inside the table. (I suppose that I can use either PdfPCells or
Cells. What's the rule of thumb there (for deciding between
the two)?)
I've tried mycell.setBorderWidth( 0 ) (like I did with the
Table above) but it doesn't work with the Cell or PdfPCell
for me.
It looks as if, with either Cell or PdfPCell (since they
both inherit from Rectangle), I'm supposed to be able to do:
disableBorderSide( Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP |
Rectangle.BOTTOM )
but that's not working for me. I've also tried setBorder( 0 )
but that fails to do anything either (that is, the grey border
on the page around the cells in my table is still there).
BTW, why doesn't PdfPTable inherit from Rectangle like Table
does? (like both cell classes)
Thanks a ton, :)
---John
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions