Just a note: you'll need ColumnText or PdfPTable to have Arabic.
Document.add(Paragraph) won't work. I'm afraid that PDF and RTF with
exactly the same base code is impossible.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of 1T3XT info
> Sent: Monday, April 14, 2008 2:52 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Asian and Arabic text
> 
> GAMBELLI Raffaele wrote:
> > 1) How is the right way to covnert awt font in itext font?
> 
> There is no such thing as an iText font.
> iText uses the font files that are present on your system:
> either you provide the path, or iText goes looking for them
> in directories such as "c:/windows/fonts"
> DefaultFontMapper.awtToPdf() does an attempt to map AWT Font
> objects to BaseFont objects. BaseFont objects does an attempt
> at finding the corresponding font, but for special uses, you
> should extend the default font mapper into a specific font
> mapper, for instance: AsianFontMapper provides a mapping to
> CJK fonts. If you need Arabic, you'll have to write your
> ArabicFontMapper, or maybe a UniversalFontMapper.
> 
> > 2) I have an input string that can be in any charset,
>  > can be from english to arabic to chinese and so on,
> > I'm only asking which is the way in itext pdf to print that string.
> 
> See my initial response: you certainly need RTL because
> Arabic is written from right to left; you probably also
> need FontSelector if you want to switch from one font to
> the other using the same String.
> 
> > The flow in my software starts from an xml, in which
> > there can be from simple paragraph to a complex table,
> > I must be able to use every element, either Paragraph
> > either PdfPTable to show the right content
> 
> Just like the Peace example in Chapter 9 fantastically does.
> 
> > 
> >>From javadoc of FontMapper:
> > A FontMapper implementation handles mappings between AWT Fonts
> > and PDF fonts. An interface is used instead of a fixed class
> > because there isn't an exact correlation between the font types,
> > so each application is free to define a mapping which is 
> appropriate for it.
> 
> Hey, that's what I've just explained: one guy contributed
> code to map Asian fonts, the result is the AsianFontMapper!
> 
> > In that javadoc too there isn't mention of PdfGraphics2D.
> 
> No, but you'll find no examples where DefaultFontMapper is
> used in a context that doesn't use PdfGraphics2D. Your use
> is the first time we hear about some other usage.
> 
> Anyway: my initial answer is still valid: use RTL and FontSelector!
> -- 
> This answer is provided by 1T3XT BVBA


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 the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to