Hello,

I print a JTable by using following code:

PdfContentByte cb = writer.getDirectContent();
cb.saveState();
Graphics2D g2 = cb.createGraphics(width, heigth);
table.print(g2);
g2.dispose();
cb.restoreState();

My problem is a quite big JTable, which needs more than 1 page to be print. I use the method cb.createGraphics(1000, 11000) and get an OutOfMemory Exception.

I want to save the whole JTable graphic into the ContentByte and use g2.clipRect to cut it to several graphics which can be print on several pages.

But with the exception, this doesn't work. Should I use one PdfContentByte per page? But how can I tell the ContentByte what part I want (there is no createGraphics method with x and y coordinates)?

So, what should I do?

Thanks and regards,

Katrin




------------------------------------------------------- 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

Reply via email to