Hi
Thanks for the examples links.
i have gone through the all examples and i did't get When to use Identity-H
if the text may or may not clubbed with utf chars. In other words, by
knowing the character type whether the utf or normal , If utf character then
Indentity-H other wise WINANSI. beacause if i use Indentity-h for all font
then the file is become large.
could u pls let me know how can i diffenitiate the encoding type based on
the charater types(utf or normal english)
I used the following code to identify the character suppored by this font
but BaseFont.charExists() returns true always even thoug the chinese
charaters are there.
String str = "Wrocław Poland 研究号码";
String fontName = "c:\\windows\\fonts\\arial.ttf";
BaseFont baseFont = BaseFont.createFont(fontName,
BaseFont.WINANSI,
true);
for (int i = 0; i < str.toCharArray().length; i++)
{
char c = str.charAt(i);
System.out.println("\n " + c + " " +
baseFont.charExists((int) c));
}
Please help how to know whether the BaseFont support the given charater or
not
Thanks in advance
Dorairaj.
1T3XT info wrote:
>
> dorairaj wrote:
>> I am creating the pdf page by using the source as jpanel,
>> i have data which may contains unicode characters to draw on jpanel
>> similary i am drawing the same text on pdf page by using the
>> pdfGraphics2D
>> object
>>
>> the Graphics2D object is created like this
>>
>> PdfTemplate localTemplate = localContentPane.createTemplate(localWidth,
>> localHieght);
>> Graphics2D localGraphics2D = localTemplate.createGraphics(localWidth,
>> localHieght,
>> localMapper);
>>
>>
>> here i am unable to see the unicode characters in the pdf page but able
>> to
>> see character which not uncode type.
>
> Why don't you read the examples?
> http://itextpdf.com/examples/index.php?page=toc&id=14
>
>> may be the problem with fonts convertion from FontMapper.awtToPdf() is
>> failed to load the exact font.
>> but in jpanel uncode text drawing works great.
>>
>> how to make my pdf page as uncode support.
>
> There are many different ways. This is one of them:
> http://itextpdf.com/examples/index.php?page=example&id=260
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> 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/
>
>
--
View this message in context:
http://old.nabble.com/how-to-choose-unicode-support-Font-from-java.awt.Font-to-com.itextpdf.text.pdf.BaseFont-tp28092144p28104681.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
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
[email protected]
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/