Hello,
I just wanted to acknowledge that I have found the root of this issue and fixed
it. However, I would not be able to tell for sure if this effect is intended.
The actual dimensions for a TextField within a PdfPTable would be dictated by
two methods 1) the PdfPTable column widths 2) the dimensions assigned to the
Rectangle used to construct the field
For the records, the undesired stretching of the TextField text was caused by
the initial default initialization of the Rectangle i.e.
Rectangle rectangle = new Rectangle(0, 0, 10, 10);
rectangle.setBorder(0);
TextField field = new TextField(writer, rectangle, value);
field.setText(value);
Changing the rectangle dimensions to fit the space needed for that column
yields the desired result i.e.
// calculate the field rectangle to have the precise dimensions for each value
separately
// the width is set to match that of the PdfPTable column width
Rectangle rectangle = new Rectangle(0, 0, rightColumnWidth, rowSpan *
ROW_HEIGHT);
rectangle.setBorder(0);
TextField field = new TextField(writer, rectangle, value);
field.setText(value);
Best regards,
Giovanni
==============================================================================
Please access the attached hyperlink for an important electronic communications
disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
________________________________
From: Leonard Rosenthol [mailto:lrose...@adobe.com]
Sent: Monday, March 29, 2010 3:00 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] corrupt PDF generated
Can you post a sample PDF that demonstrates the problem?
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/