iText doesn't discover fonts. There's a mapping in DefaultFontMapper
between the awt font name and the pdf font name. You have to make sure
that the pdf font or an alias has the same name. It all happens in
DefaultFontMapper, look at the source.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Abhishek Vaidya
> Sent: Wednesday, May 02, 2007 10:20 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] query
> regardingjapanesefontsnotappearinginthe PDF
>
> Hi,
>
> 1)As you said that Identity-H fonts should be embedded. I tried
> debugging itext code. Actually cold fusion has extended your
> DefaultFontMapper class. I attached a breakpoint in the awtToPdf()
> (overriding) method of cold fusion class (which is a callback
> method and
> is called by itext).It accepts a java.awt.Font argument. On
> the machine
> on which fonts appear, the Arial font is passed to the
> awtToPdf() method
> in one of the calls. On the other machines this Font is not being
> passed. Means the other machines are not able to pick these fonts.
>
> 2) As suggested by you -" About the problem of the font not appearing
> check that the mapping in DefaultFontMapper is correct and
> that it maps
> to an Identity-H encoded font, Linux may give different names to the
> fonts."
>
> Which mapping in DefaultFontMapper should be correct? The Font that is
> passed to awtToPdf() has the name "arial Unicode MS" . Is
> this what you
> are asking me to verify?
>
> Thanks
> Abhishek
>
>
> Can I know from where is this method awtToPdf() called? And
> what is the
> mechanism that Itext uses to discover the fonts?
>
> Thanks
> Abhishek
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Paulo Soares
> Sent: Tuesday, May 01, 2007 8:31 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] query regarding
> japanesefontsnotappearinginthe PDF
>
> There's an extra problem here in that iText doesn't support Identity-H
> fonts
> not embedded. Just removing the font stream doesn't make it a not
> embedded
> font. It can be done but not with the current structure. In
> other words,
>
> even if it works with the font present in the system, it's by accident
> (the
> reality is that Acrobat goes to extreme lengths to display
> crappy PDFs).
>
> About the problem of the font not appearing check that the mapping in
> DefaultFontMapper is correct and that it maps to an Identity-H encoded
> font,
> Linux may give different names to the fonts.
>
> Paulo
>
> ----- Original Message -----
> From: "Leonard Rosenthol" <[EMAIL PROTECTED]>
> To: "Post all your questions about iText here"
> <[email protected]>
> Sent: Tuesday, May 01, 2007 3:36 PM
> Subject: Re: [iText-questions] query regarding japanese
> fontsnotappearinginthe PDF
>
>
> > On May 1, 2007, at 9:20 AM, Abhishek Vaidya wrote:
> >> Embedding of the fonts is a necessity only if the system
> doesn't have
> >> the required font.
> >
> > True - but how do you guarantee that? Mac OS X nor Linux includes
> > that font, and in fact most standard Windows distribution don't
> > either. That's probably the majority of machines out there that
> > won't be able to view your PDF :(.
> >
> >
> >> Always embedding the fonts is not a good option as it can make the
> >> PDF size too huge.
> >>
> > Not if you also subset.
> >
> >
> > Leonard
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/