Chinese Characters

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for COM/ActiveX (v6)  /  Chinese Characters

DynamicPDF CoreSuite for COM/ActiveX (v6) Forum

 Feb 12 2013 7:16 AM
Dear all,

I've to add a specific legal notice on a document... but in Chinese Character.

Do you know if its possible ? And if yes, how ? Through a special font ? With Unicode Characters ?

Example : how to display this :

Thanks a lot !
 Feb 12 2013 8:38 AM
Posted by a ceTe Software moderator

Yes, you can add special characters to the PDF document without any problem. You will have to use the Open type or True type font files which has support for the characters you are adding.

You can refer to the help documentation for adding Open Type fonts and Type1 fonts on our website.

ceTe Software Support Team.
 Feb 12 2013 8:46 AM

Unfortunately I know that, and I've yet tried, but the problem is that I can't require a specific character of a font !

So for example, I can write "a", or HTML Encode or other things like that. But How to say to the pdf that this character :
is the unicode represention of "申" in my font ?

If I add "申", the font write "ç" and two empty symbols, but does not understand that its a single character...
 Feb 12 2013 4:56 PM
Posted by a ceTe Software moderator

Please email the following information to our support team: so we can look into this further.

1. Font file being used to add Chinese characters
2. Code used to add the text to PDF.
3. Output PDF document.

ceTe Software Support Team.
 Feb 15 2013 8:50 AM
Its the point ! Remember I try to add this character : ?
HTML Unicode Value : "& # 30003;"
HEX Unicode Value : "7533"

With this :

Set cRow = cTable.AddRow2( DPDF_Font_SinoTypeSongLight, 12, "48626F", "FFFFFF" )

I tried :

Set cCell = cRow.AddCell2( "\u7533", , , , , 2 )
Or Set cCell = cRow.AddCell2( Unescape('\u7533'), , , , , 2 )
> display '\u7533'

Or, trying through HTML engine :
Call cCell.SetFormattedTextArea( "& # 30003;", 0, 0, 536, 50, DPDF_Font_SinoTypeSongLight, 12, False )
> error message : error '80131500' : FontFamily specified not available.Please add FontFamily to the document
> logical if its not a family

So trying creating a family with the simsun font :
> display : "& # 30003;" with a first little square (character not found, I guess).

I cannot write in my ASP code :
Set cCell = cRow.AddCell2( "?", , , , , 2 )
Because my source files encoding does not allow it. So I have to write "something" that can be understood as a special character, just like the browser display "?" when I write "response.Write("& # 30003;")"

Best Regards,
 Feb 15 2013 2:00 PM
Posted by a ceTe Software moderator

Here is the sample code that shows how to add Chinese characters using hex code in a table cell directly. You can use ChrW(&h7533) to represent the Chinese character in FormattedTextArea as well.

Set Row1 = MyTable.AddRow2(DPDF_Font_SinoTypeSongLight, 16, MyDocument.Colors.Black, MyDocument.Colors.Gray)
Row1.AddCell2( ChrW(&h7533)  )

ceTe Software Support Team.
 Feb 18 2013 4:57 AM
Its working Perfectly.

Thanks a lot for support !
 Sep 12 2016 6:03 AM
HI I am using same but i am working java code can you share how to get Chinese language in cete dynamic pdf
i am using Formatedtext area
 Sep 12 2016 12:02 PM
Posted by a ceTe Software moderator

You can add Chinese characters using a correct Unicode value. Below is the code sample for adding Chinese character using DynamicPDF for Java product.

            Document document=new Document();
            Page page=new Page();
            Font fontObj=Font.getSinoTypeSongLight();
            FontFamily fontFamilyObj=new FontFamily("SinoTypeChinese",fontObj);
            //Adding Chinese character using Unicode value.
            String text="\u7533";
            FormattedTextArea areaUnicode=new FormattedTextArea(text,0,0,100,50,fontFamilyObj,12,true);

ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 4:41 PM.