ARTICLE AD BOX
I am trying to draw a table with PdfPig using the DrawLine method.
I draw my lines using the code shown, for all sides. I am able to get most of the table working, however the last line ends up looking like the image below.
PdfPoint startRow = new(borderStartPointX, borderStartPointY); PdfPoint endRow = new(borderEndPointX , borderEndPointY); DrawLine(startRow, endRow, borderWidth)
What can I do to fix it? How can I make the bottom border start and end properly?
31 silver badge5 bronze badges
New contributor
cdincer is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
You need to adjust/stretch your points according to line width you use. Otherwise it’s going to have issues like this. You will need to this for top, bottom, left, right etc etc.
I suggest looking into SlapKit for drawing tables on PDF. It’s much easier than building this stuff from scratch.
New contributor
ibrahim burhan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Explore related questions
See similar questions with these tags.
