Hi!
I found strange behaviour at combinations of empty tables and drawing a line.
When you execute the code below, you can see that on the first page the first phrase
is written over the table. This problem exists only on the first page, on the
following pages it works perfectly. Could you fix this?
I use Bruno's iText 1.0.1.
And you never answered to may setGrayFill Bug, did you read the post?
Example-Code:
Document pdf = new Document();
try
{
PdfWriter writer = PdfWriter.getInstance(pdf, new FileOutputStream("C:\\TEST.pdf"));
pdf.open();
//Empty table used as spacer because newLine() doesn't work well with the
HorizontalLine
PdfPTable table = new PdfPTable(1);
table.getDefaultCell().setBorder(0);
table.getDefaultCell().setFixedHeight(5);
table.addCell(" ");
//Table with example content
float theWidths[] = {25, 25, 25, 25};
PdfPTable table2 = new PdfPTable(theWidths);
table2.getDefaultCell().setBorder(0);
table2.addCell("oadjodj");
table2.addCell("sfsdfsdf");
table2.addCell("sdfsdfsdf");
table2.addCell("sfsfsfsdf");
for(int i=0; i < 4; i++)
{
pdf.add(table2); //table with content
pdf.add(new Phrase("Example phrase should be under the tables"));
pdf.add(table); //spacer
Graphic g = new Graphic();
g.setHorizontalLine(2f, 90f, new Color(100, 100, 100));
pdf.add(g);
pdf.add(table); //spacer
pdf.add(new Phrase("Test\n"));
pdf.newPage();
}
}
catch (DocumentException ex)
{
ex.printStackTrace();
}
catch (IOException ex)
{
ex.printStackTrace();
}
pdf.close();
áÄë^¨¥Ë)¢{(ç[ÈL.)îÅ;¢¸À^rjw±¥êírÈ5Eè®;¬¶ÈZ®§Ê«²H¥Ä{©~ÈËç{±Nëh®&¥°·®w¯z¼)à~º&¶jÈl
ée¶2±§fp¥É'£m¶ÿiÛ(±ÙÜoÚv'uÛZÝ÷ïZ)rX$ÞÆÚzËb¢{&j)b
b²Ø{j¹ë-ì+-²Ê.Ç¢¸ëa¶Úlÿùb²Û,¢êÜyú+éÞùb²Û?+-wèþ+^ÆÚzËb¢{