Auto-size is always a best effort and as long as all text is there, it's
correct. Probably the iText fit algorithm  could be improved.

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Uno Masaki
> Sent: Wednesday, June 20, 2007 1:48 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Filling japanese text fields
> 
> Paulo,
> 
> Thank you for your reply.
> 
> iText in Action says in chapter 16:
> "The simplest solution is to set the font size to 0.
>  According to the PDF Reference, Acrobat auto-sizes the
> text in an AcroForm's text field to best fill the area.
>  When flattening a text field with font size 0, iText does
> the same thing."
> 
>  When flattening a text field after setField(),
> doesn't iText do anything to fill the area?
> 
>  After flattening, is the appearance Acrobat Reader's
> problem?
> 
> Best Regards,
> Masaki UNO
> 
> --- Paulo Soares <[EMAIL PROTECTED]> wrote:
> 
> > When the field is auto-size a best effort is made to
> > fit the text that may 
> > or may not match what Acrobat does.
> > 
> > Paulo
> > 
> > 
> > > Hi,
> > >
> > > I have a question about acroforms with japanese
> > font.
> > >
> > > I want to fill an text field whose font is
> > japanese font
> > > (KozMinPro, MS Mincho, etc.).
> > > The text field is created with Acrobat form tool.
> > > The font-size is auto-size and the multiline flag
> > is on.
> > >
> > > When the text field is filled with japanese long
> > text on
> > > Java program using iText,
> > > some areas below the text in the text field will
> > be not
> > > filled
> > > according to circumstances.
> > >
> > >
> > > Could you tell me how to best fill the japanese
> > text field
> > > ?
> > >
> > >
> > > My environment:
> > >  JDK 1.5
> > >  iText 2.0.4 with iTextAjian.jar
> > >  Acrobat 8.1
> > >
> > >
> > > I've created a sapmple PDF and attached it.
> > > All of text fields has black border,
> > > are auto-size and multiline,
> > > and are filled with same japanese text.
> > >
> > > First field was filled with Preview mode of
> > Acrobat.
> > > Others were filled with my program using iText,
> > > AcroFields#setField(String, String).
> > >
> > > Sample2 and sample3 generated by iText have
> > > space below text. I want to adjust them like
> > > the first field.
> > >
> > >
> > > Best Regards,
> > > Masaki UNO 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to