There's nothing to look to. Your thaidata.txt has some encoding that you
must know. That encoding is the key to turn the txt into the unicode string
that java uses. Candidates are:

Cp874 - IBM Thai
MS874 - Windows Thai
TIS620 - TIS620, Thai


After that step you'll have to use a TT font with encoding Identity-H.

Best Regards,
Paulo Soares

----- Original Message -----
From: "krishnakumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 13:41
Subject: [iText-questions] issuse in PDF encoding for read thai char


> Hi,
> here im trying to read a thai charecters from a text file and creating a
> pdf with iText.
> 1.thaidata.txt contains the original source file.
>   when i convert the bytes which i read from source text file into
> String using the PdfEncodings with different encoding like
> as Cp1252,PDF,"".it gerates the following outut file.all are not ok with
> the source file content.
>
> 2.thaidata-Cp1252.txt
> 3.thaidata-PDF.txt
> 4.thaidata-null.txt
>
>     public static void getThaiFileData()
>     throws FileNotFoundException
>     {
>  try
>  {
>      FileInputStream fis = new FileInputStream(new
> File("c:\\temp\\thaidata.txt"));
>      System.out.println(fis.available());
>
>      byte[] b = new byte[4000];
>      fis.read( b);
>        FileOutputStream foss = new FileOutputStream(
> "c:\\temp\\thaidataPDF.txt");
>        PdfEncodings  pfd=new PdfEncodings();
>        line=pfd.convertToString(b,"");
>        foss.write(line.getBytes());
>  } catch(FileNotFoundException e)
>  {
>      throw e;
>  }
>  catch(IOException eio)
>  {
>      eio.printStackTrace();
>  }
>     }
>
>
>    Can you please look into it and help me.
>
> Thanks with best regards,
> K.Krishna Kumar
>



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to