Hi
The following code demonstrates how the element
spacing gets messed up if you start a page using a table:
import com.lowagie.text.*;
import com.lowagie.text.pdf.*; import java.io.*; public class Test {
public Test() {
try { Paragraph paragraph = new Paragraph("Hello world"); Table table = new Table(1); Cell cell = new Cell(paragraph); table.addCell(cell); Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream("test.pdf")); document.open(); document.add(table); document.add(paragraph); document.add(table); document.newPage(); document.add(table); document.add(paragraph); document.add(table); document.newPage(); document.add(table); document.add(paragraph); document.add(table); document.newPage(); document.add(table); document.add(paragraph); document.add(table); document.close(); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args)
{
Test test = new Test(); } }
Is there something I am missing or is this a bug
?
Jean-Marc
|