Finaly succeded!
Magic is done by finding right TTF FONTS, that has special characters and also 
finding right ENCODING to view this characters (yes Paulo, now I can see more 
than 256 chars ;).

This is the way I am doing it:

Document documentA = new Document(PageSize.A4, 40, 25, 15, 32);
FontFactory.register("C:\\WINNT\\Fonts\\Georgia.TTF");
FontFactory.register("C:\\WINNT\\Fonts\\Verdana.TTF");
PdfWriter.getInstance(documentA, new FileOutputStream("D:\\Files\\Font.pdf"));
XmlParser.parse(documentA, "D:\\Files\\Font.xml");

and then XML with font definitions and special characters looks quite simple:

<?xml version="1.0" ?>
<itext>
<paragraph>Font test</paragraph>
<paragraph font="Georgia" encoding="iso-8859-2">Georgia:
&#352;&#353;&#381;&#382;&#269;&#268;&#262;&#263;&#272;&#273;
</paragraph>
<paragraph font="Georgia" encoding="iso-8859-2" style="bold">Georgia BOLD:
&#352;&#353;&#381;&#382;&#269;&#268;&#262;&#263;&#272;&#273;
</paragraph>
<paragraph font="Verdana" encoding="iso-8859-2">Verdana:
&#352;&#353;&#381;&#382;&#269;&#268;&#262;&#263;&#272;&#273;
</paragraph>
<paragraph font="Georgia" encoding="windows-1250">Georgia:
&#352;&#353;&#381;&#382;&#269;&#268;&#262;&#263;&#272;&#273;
</paragraph>
<paragraph font="Verdana" encoding="windows-1250">Verdana:
&#352;&#353;&#381;&#382;&#269;&#268;&#262;&#263;&#272;&#273;
</paragraph>
</itext>

And at the end, PDF looks like I whished.

Paulo & Mark, thank you!

Robert

____________________
http://www.email.si/



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to