As a visible cell border only to the right and bottom in an Itext Pdf cell

when I try cell.setBorder(Rectangle.BOTTOM);

cell.setBorder(Rectangle.RIGHT);

It overlaps the bottom border and sets only the right border of the selected cell

The same thing happened in reverse with

cell.setBorder(Rectangle.BOTTOM);

cell.setBorder(Rectangle.RIGHT);

Can I set the bottom and right borders of a cell together for a selected cell?

+7
source share
2 answers

In iTextSharp, I used:

 cell.Border = Rectangle.BOTTOM_BORDER | Rectangle.RIGHT_BORDER; 

You can try:

 cell.setBorder(Rectangle.BOTTOM | Rectangle.RIGHT); 
+21
source

Yes, maybe Rectangle.BOTTOM = 2, Rectangle.TOP = 1, Rectangle.RIGHT = 8, Rectangle.LEFT = 4 so for the right and bottom try cell.setBorder (10) ;, it works for me itext1.3

+2
source

All Articles