You need to post a small complete example so that the problem can be
reproduced.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of David Marcillo
> Sent: Tuesday, January 24, 2006 3:45 PM
> To: [email protected]
> Cc: [EMAIL PROTECTED]
> Subject: [iText-questions] PdfPTable writing additional row
> 
> Hello,
> 
> I am new to itext and need a little help with PdfPTable.
> The problem:  I am getting an extra row printed at the end of 
> an inner 
> table.
> Problem Overview:
> 1- I creata an inner table with six columns and no borders.
> 2- I add data to each column of the inner table.
> 3- I create a second table with borders and one cell, so I 
> can insert the 
> first table.
> 4- I add the first inner table to the second table with borders
> 5- I sebd the second table to the document object
> 6- * Problem ? I get an extra row printed at the end of the 
> inner table
> 
> I am including part of the code in the following section:
> 
> - asume I created the document objet....
> 
> I created an inner table with six columns as follow and now borders
> 
>   PdfPTable aTempTable = new PdfPTable( new float []{3f, 1f, 
> 1f, 1f, 1f, 1f 
> } );
>   aTempTable.setHorizontalAlignment( Element.ALIGN_LEFT );
>   aTempTable.setWidthPercentage(100);
>   aTempCell = aTempTable.getDefaultCell();
>   aTempCell.setHorizontalAlignment( Element.ALIGN_LEFT );
>   aTempCell.disableBorderSide( Rectangle.LEFT );
>   aTempCell.disableBorderSide( Rectangle.RIGHT );
>   aTempCell.disableBorderSide( Rectangle.TOP );
>   aTempCell.disableBorderSide( Rectangle.BOTTOM );
> 
> then I add a bunch of cells to the inner table as follows
> 
>   // cell Row1 Col1
>   String aszTemp = "Service";
>   Chunk aTempChunk = new Chunk( aszTemp, aTempFont12 );
>   aTempChunk.setTextRise(boylescript);
>   Paragraph aTempParagraph = new Paragraph();
>   aTempParagraph.add( aTempChunk );
>   aTempTable.addCell(aTempParagraph);
>   // cell Row1 Col2
>   aszTemp = "Quantity";
>   aTempChunk = new Chunk( aszTemp, aTempFont10 );
>   aTempChunk.setTextRise(boylescript);
>   aTempParagraph = new Paragraph();
>   aTempParagraph.add( aTempChunk );
>   aTempTable.addCell(aTempParagraph);
>   // cell Row1 Col3
>   aszTemp = "Units";
>   aTempChunk = new Chunk( aszTemp, aTempFont10 );
>   aTempChunk.setTextRise(boylescript);
>   aTempParagraph = new Paragraph();
>   aTempParagraph.add( aTempChunk );
>   aTempTable.addCell(aTempParagraph);
>   // cell Row1 Col4
>   aszTemp = "Rate";
>   aTempChunk = new Chunk( aszTemp, aTempFont10 );
>   aTempChunk.setTextRise(boylescript);
>   aTempParagraph = new Paragraph();
>   aTempParagraph.add( aTempChunk );
>   aTempTable.addCell(aTempParagraph);
>   // cell Row1 Col5
>   aszTemp = "Min. Chg.";
>   aTempChunk = new Chunk( aszTemp, aTempFont10 );
>   aTempChunk.setTextRise(boylescript);
>   aTempParagraph = new Paragraph();
>   aTempParagraph.add( aTempChunk );
>   aTempTable.addCell(aTempParagraph);
>   // cell Row1 Col6
>   aszTemp = "Charges";
>   aTempChunk = new Chunk( aszTemp, aTempFont10 );
>   aTempChunk.setTextRise(boylescript);
>   aTempParagraph = new Paragraph();
>   aTempParagraph.add( aTempChunk );
>   aTempTable.addCell(aTempParagraph);
> 
> I add many more rows...
> 
> Then I create a second outer table with borders like the following
> 
>   // create second outer Boderder table
>   PdfPTable aBorderTable = new PdfPTable( 1 );
>   aBorderTable.setHorizontalAlignment( Element.ALIGN_LEFT );
>   aBorderTable.setWidthPercentage(100);
>   aTempCell = aBorderTable.getDefaultCell();
>   aTempCell.setHorizontalAlignment( Element.ALIGN_LEFT );
>   aTempCell.enableBorderSide( Rectangle.LEFT );
>   aTempCell.enableBorderSide( Rectangle.RIGHT );
>   aTempCell.enableBorderSide( Rectangle.TOP );
>   aTempCell.enableBorderSide( Rectangle.BOTTOM );
> 
> I then add the first table to the inside of the send table like the 
> following
>   aBorderTable.addCell(aTempTable);
> 
> then I send the second border table to the document
>   aTempDocument.add(aBorderTable);
> 
> and I get the problem....
> I get an extra row at the end of the inner table...
> 
> Thanks,
> David Marcillo
> 
> Please help.....
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&;
> dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to