Horsfield, Dr M.A. wrote:
Dear Bruno,This is a remark that should be posted to the mailing-list.
As for the PageSize update, I didn't have the time to make a 1.3.1 release yet,
but I don't think I will use the code you have sent me.
I think it's better to create a list of PageSizes (dynamically, using reflection?)
in an external class. The description of the PageSize is superfluous for most
applications using iText. By mapping the description to the pagesize in an
external class, you can save memory if you don't need pagesize descriptions.
You may be interested in the following stack overflow. I saw it when I was testing out printing to all selectable page sizes. I had selected a tiny page size, but hadn't adjusted the font to a more suitable size for the page. I guess iText couldn't fit a single word across the page, and was spawning more and more pages ad infinitum.
Regards Mark
pc0:~/[87]> Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError at java.lang.ref.Finalizer.<init>(Finalizer.java:67) at java.lang.ref.Finalizer.register(Finalizer.java:72) at java.util.zip.DeflaterOutputStream.<init>(DeflaterOutputStream.java:78) at com.lowagie.text.pdf.PdfContents.<init>(PdfContents.java:92) at com.lowagie.text.pdf.PdfDocument.newPage(PdfDocument.java:810) at com.lowagie.text.pdf.PdfDocument.carriageReturn(PdfDocument.java:2071) at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:1433) at com.lowagie.text.pdf.PdfDocument.initPage(PdfDocument.java:1994) at com.lowagie.text.pdf.PdfDocument.newPage(PdfDocument.java:812) at com.lowagie.text.pdf.PdfDocument.carriageReturn(PdfDocument.java:2071) at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:1433) at com.lowagie.text.pdf.PdfDocument.initPage(PdfDocument.java:1994) at com.lowagie.text.pdf.PdfDocument.newPage(PdfDocument.java:812) at com.lowagie.text.pdf.PdfDocument.carriageReturn(PdfDocument.java:2071) at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:1433) at com.lowagie.text.pdf.PdfDocument.initPage(PdfDocument.java:1994) at com.lowagie.text.pdf.PdfDocument.newPage(PdfDocument.java:812) at com.lowagie.text.pdf.PdfDocument.carriageReturn(PdfDocument.java:2071) at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:1433) at com.lowagie.text.pdf.PdfDocument.initPage(PdfDocument.java:1994) at com.lowagie.text.pdf.PdfDocument.newPage(PdfDocument.java:812) at com.lowagie.text.pdf.PdfDocument.carriageReturn(PdfDocument.java:2071) at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:1433) at com.lowagie.text.pdf.PdfDocument.initPage(PdfDocument.java:1994) at com.lowagie.text.pdf.PdfDocument.newPage(PdfDocument.java:812)
etc etc
Dr. Mark A. Horsfield, PhD, MIEE, CEng,
Reader in Medical Physics, Department of Cardiovascular Sciences
University of Leicester
Leicester LE1 5WW, UK
[EMAIL PROTECTED]
Tel: +44-(0)116 2585080
FAX: +44-(0)870 7053111
------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
