I use iTextSharp to create some PDF files. I have two tables that have content, and I want to place some space between the two tables, for example, equivalent to 1 line of text (using the same font as the tables around the space).
Below is the code that I use to add two tables. I cannot figure out how to place vertical space between two tables.
Table upperTable = new Table(1);
upperTable.Border = Rectangle.NO_BORDER;
upperTable.DefaultCell.Border = Rectangle.NO_BORDER;
upperTable.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
upperTable.AddCell(new Phrase("some text", font3));
d.Add(upperTable);
Table lowerTable= new Table(1);
lowerTable.Border = Rectangle.NO_BORDER;
lowerTable.DefaultCell.Border = Rectangle.NO_BORDER;
lowerTable.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
lowerTable.AddCell(new Phrase("some other text", font3));
d.Add(lowerTable);
Can someone tell me how can I add vertical space between two tables?
Thanks!
source
share