Hey folks-

I've been running into a problem when trying to add tables to my documents. Specifically, when I end up with a rowspan which extends beyond the current page, it looks as though the code is dropping into an infinite loop. Any thoughts? Ideas?

Here is a piece of sample code I put together which reproduces the problem (on my system at least).

response.setContentType("application/pdf");
ByteArrayOutputStream ba = new ByteArrayOutputStream();
Document document = new Document(PageSize.A4, 10, 10, 10, 10);
PdfWriter.getInstance(document, ba);
document.open();
Table datatable = new Table(2);
int nRows = 100;
Cell cell = new Cell("Rowspan: " + nRows);
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setRowspan(nRows);
datatable.addCell(cell, 0, 0);
for (int r=0; r < nRows; r++) {
cell = new Cell("Cell " + r);
datatable.addCell(cell, r, 1);
}
document.add(datatable);
document.close();
response.setContentLength(ba.size());
ServletOutputStream out = response.getOutputStream();
ba.writeTo(out);
out.flush();

Thanks,
Kevin Kennedy





_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to