Sending to the list for archival purpsoses in case
anyone is interested.

The solution we used was to set the font size to 60
percent of the rectangle height and then set an extra
top margin on the field equal to 40 percent of the
rectangle height. This closely approximates the way
Adobe Reader renders the autosize fields that we've
looked at.

-a.



--- bruno <[EMAIL PROTECTED]> wrote:

> Andrew Smith wrote:
> 
> >Is there something in the itext api to mimic the
> >autosize feature that Adobe Acrobat provides for
> form
> >fields? 
> >  
> >
> Yes. If you set the fontsize to 0, the font-size
> will be adjusted
> automatically so that the text fits the text field.
> AcroFields form = stamper.getAcroFields();
> form.setFieldProperty("field", "textsize", new
> Float(0), null);
> 
> >The problem I have is that my height is too large.
> The
> >fonts always appear too large on the resulting
> form.
> >  
> >
> Oh, I don't know if this will be fixed by setting
> the font-size to 0.
> 
> >Any characters below or above the line like j's and
> >g's are especially problematic. Is there some
> constant
> >adjustment factor I need to scale my font by? Is
> there
> >a better way to go about this?
> >
> There is a way to adjust the positioning of the
> text, but it doesn't
> scale the font.: form.setExtraMargin(3, 3);
> br,
> Bruno
> 
> 
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to