Let's assume that you have an array b[] with the text encoded in hkscsbig5.

byte b[] = ...// my hk text
PdfEncodings.loadCmap("HKscs-B5-H", PdfEncodings.CRLF_CID_NEWLINE);
String text = PdfEncodings.convertCmap("HKscs-B5-H", b);
BaseFont bf = BaseFont.createFont("MSungStd-Light", "Identity-H",
BaseFont.NOT_EMBEDDED);
Font FontChinese = new Font(bf, 12, Font.NORMAL);

Best Regards,
Paulo Soares


> -----Original Message-----
> From: Ray Chan [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, March 13, 2003 14:16
> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject:      Cmaps Usage
> 
> Hello Paulo,
> 
> Thank you for adding the cmaps into the iText. I try to use it but how?
> 
> I have try the following under Linux server and get the output in a client
> 
> IE but I got space character for hkbig5 and hkscsbig5:
> 
> import java.io.*;
> import java.lang.*;
> import java.sql.*;
> ...
> import com.lowagie.text.*;
> 
> import com.lowagie.text.pdf.*;
> 
> ...
> BaseFont bf = BaseFont.createFont("MSungStd-Light", "Identity-H", 
> BaseFont.NOT_EMBEDDED);
> Font FontChinese = new Font(bf, 12, Font.NORMAL);
> document.open();
> PdfPTable table = new PdfPTable(TOTALCOLUMN);
> ...
> 
> table.writeSelectedRows(0, -1, XPOS, YPOS, writer.getDirectContent());
> 
> document.close();
> 
> Can you teach me how to use the cmaps to produce hkscsbig5 character in
> pdf?
> Thank you in advanced
> 
> 
> 
> _________________________________________________________________
> 


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to