If you are using the latest version it will work.
----- Original Message -----
From: "itext user" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, January 12, 2005 2:59 PM
Subject: [iText-questions] large cell values in PdfTable
> I have problems rendering table with large cell values. This is inside a
web application. Is there any setting required to allow large values.
Basically, the whole table is not rendered. Following is the code snippet
>
> // create table
> PdfPTable datatable = new PdfPTable(9);
> int headerwidths[] = {11, 11, 11, 11, 11, 11, 11, 11, 11};
> datatable.setWidths(headerwidths);
> datatable.setWidthPercentage(100); // percentage
> datatable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
>
> // set column names
> for (int i = 0; i < 9; i++){
> PdfPCell cell = new PdfPCell( new Phrase("colname",
> new Font (Font.HELVETICA, 11, Font.BOLD)));
> cell.setBackgroundColor(Color.gray);
>
> datatable.addCell(cell);
> }
>
> // add cell values
> // construct a string value that is large to populate in the cell
> String value = "";
> for (int i = 0; i < 500; i++){
> value += "a";
> }
>
> for (int i = 0; i < 5; i++){
> datatable.addCell("r" + i + "c1" + value);
> datatable.addCell("r" + i + "c2");
> datatable.addCell("r" + i + "c3");
> datatable.addCell("r" + i + "c4");
> datatable.addCell("r" + i + "c5");
> datatable.addCell("r" + i + "c6");
> datatable.addCell("r" + i + "c7");
> datatable.addCell("r" + i + "c8");
> datatable.addCell("r" + i + "c9");
> }
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions