user1409935
user1409935

Reputation: 373

how to visible Cell Border for only right and bottom in Itext Pdf cell

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 ?

Upvotes: 11

Views: 28247

Answers (2)

Arun
Arun

Reputation: 31

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

Upvotes: 3

StevenGodin
StevenGodin

Reputation: 498

In iTextSharp I have used:

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

You could try:

cell.setBorder(Rectangle.BOTTOM | Rectangle.RIGHT);

Upvotes: 32

Related Questions