how to visible Cell Border for only right and bottom in Itext Pdf cell
25,636
Solution 1
In iTextSharp I have used:
cell.Border = Rectangle.BOTTOM_BORDER | Rectangle.RIGHT_BORDER;
You could try:
cell.setBorder(Rectangle.BOTTOM | Rectangle.RIGHT);
Solution 2
Yes it is possible, Rectangle.BOTTOM=2,Rectangle.TOP=1,Rectangle.RIGHT=8,Rectangle.LEFT=4 so for right and bottom,try cell.setBorder(10);,it works for me itext1.3
Author by
user1409935
Health Care Software Engineer Working with Laboratory Information Management System Team at Sun Pharma Advanced Research Center , Vadodara , India since August 2011
Updated on January 30, 2020Comments
-
user1409935 over 4 years
when I am trying
cell.setBorder(Rectangle.BOTTOM);
cell.setBorder(Rectangle.RIGHT);
It is overlapping bottom border and setting only right border of selected cell
same thing happened in reverse manner with
cell.setBorder(Rectangle.BOTTOM);
cell.setBorder(Rectangle.RIGHT);
Does it possible to set bottom and right border of cell together for selected cell ?
-
Frankie Loscavio over 9 yearsThank you for your answer. "cell.setBorder(Rectangle.BOTTOM | Rectangle.RIGHT);" worked for me in the Java version