我正在使用iTextSharp來生成一些PDF文件。我有兩個有內容的表格,我想在兩個表格之間放一些空格,比如說相當於1行文字(使用與空格周圍表格相同的字體)。iTextSharp垂直間距
下面是我用來添加這兩個表的代碼。我無法弄清楚的是如何在兩個表格之間放置一個垂直空間。
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);
有人能告訴我如何添加兩個表之間的垂直空間嗎?
謝謝!
此問題已在2009年iTextSharp的有`Table`對象,直到版本4.3.x,並從5.x版上,它是`PdfPTable` – 2012-10-16 13:45:41