----- Original Message ----- From: "saxenashyam" <[EMAIL PROTECTED]> To: "Paulo Soares" <[EMAIL PROTECTED]>; "saxenashyam" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Tuesday, March 07, 2006 7:23 AM
Subject: Re: RE: [iText-questions] Parsing of polish character


Hi Paulo ,


I am registering  font  with


FontFactory.register("c://windows/fonts/ARIAL.TTF");


and setting the encoding in xml


&lt;?xml version="1.0" encoding="ISO-8859-2" ?&gt;


Thats the xml encoding.


and selecting font ="Arial " in all palcae in my xml document .


You'll also need encoding="ISO-8859-2" for the font encoding.


Can you tell  me what is the problem ?


if need i can send my xml file to you





Thanks in advance










"Paulo Soares" wrote:



The font must be registered in FontFactory and that font and encoding
must be selected in the xml.

&gt; -----Original Message-----
&gt; From: [EMAIL PROTECTED]
&gt; [mailto:[EMAIL PROTECTED] On
&gt; Behalf Of saxenashyam
&gt; Sent: Thursday, March 02, 2006 12:04 PM
&gt; To: [email protected]
&gt; Subject: [iText-questions] Parsing of polish character
&gt;
&gt; Hi
&gt;
&gt; I am using ITEXT1.3.6 to convert xml to pdf.
&gt; Its working fine except Polish character .
&gt; for these I using following step :
&gt;
&gt; Step 1) Setting xml file encoding to "ISO-8859-2"
&gt; step 2) get the file as org.xml.sax.InputSource
&gt;
&gt; InputStreamReader reader = new InputStreamReader(new
&gt; FileInputStream(new File("contract.xml")),"ISO-8859-2");
&gt; InputSource inputSource = new InputSource(reader);
&gt; inputSource.setEncoding("ISO-8859-2");
&gt;
&gt; Step 3) Creating my own custumtaghandler &amp; setting the
&gt; basefont in its constructor
&gt; CustomTagHandler cth = new CustomTagHandler(document,
&gt; writer, getCustomMap());
&gt;
&gt; BaseFont bf =
&gt; BaseFont.createFont("c://windows/fonts/ARIAL.TTF",
&gt; "ISO-8859-2",BaseFont.NOT_EMBEDDED);
&gt; setBaseFont(bf);
&gt;
&gt; step 4) create SAXParser and parse the input stream
&gt;
&gt; SAXParser parser =
&gt; SAXParserFactory.newInstance().newSAXParser();
&gt; parser.parse(inputSource, cth);
&gt;
&gt; But in the pdf spcial character are not display correctly
&gt;
&gt; Can any body what is wrong with these code
&gt;
&gt; Shyam
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; -------------------------------------------------------
&gt; This SF.Net email is sponsored by xPML, a groundbreaking
&gt; scripting language
&gt; that extends applications into web and mobile media. Attend
&gt; the live webcast
&gt; and join the prime developer group breaking into this new
&gt; coding territory!
&gt; http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=110944&amp;bid=241720&amp;
&gt; dat=121642
&gt; _______________________________________________
&gt; iText-questions mailing list
&gt; [email protected]
&gt; https://lists.sourceforge.net/lists/listinfo/itext-questions
&gt;

Indiatimes Email now powered by APIC Advantage. Help!
" " Help





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to