Reputation: 941
I am using iTextSharp for creating the pdf.
Is it possible to provide space between the rows in pdfptable?
Upvotes: 7
Views: 15017
Reputation: 11
You can add a cell with a fixed colspan, no border and new line phrase like this:
PdfPCell blankRow = new PdfPCell(new Phrase("\n"));
blankRow.setFixedHeight(5f);
blankRow.setColspan(4);
blankRow.setBorder(Rectangle.NO_BORDER);
Upvotes: 1
Reputation: 77606
You need to use table events to do that.
Java example: http://itextpdf.com/examples/iia.php?id=95
C# example: http://kuujinbo.info/iTextInAction2Ed/index.aspx?ch=Chapter05&ex=PressPreviews
Note that I made the assumption that you want cell spacing (instead of cell padding) similar to what you can see here: http://examples.itextpdf.com/results/part1/chapter05/press_previews.pdf
Upvotes: 4