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 !
Chinese Characters
Re: Chinese Characters
Support · Feb 12, 2013Hello,
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.
Thanks,
ceTe Software Support Team.
Re: Chinese Characters
Forum member · Feb 12, 2013Thanks,
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...
Re: Chinese Characters
Support · Feb 12, 2013Hello,
Please email the following information to our support team: [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] 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.
Thanks,
ceTe Software Support Team.
Re: Chinese Characters
Forum member · Feb 15, 2013Its 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,
Re: Chinese Characters
Support · Feb 15, 2013Hello,
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) )
Thanks,
ceTe Software Support Team.
Re: Chinese Characters
Forum member · Feb 18, 2013Its working Perfectly.
Thanks a lot for support !
Re: Chinese Characters
Forum member · Sep 12, 2016HI 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
Re: Chinese Characters
Support · Sep 12, 2016Hello,
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();
document.getPages().add(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);
page.getElements().add(areaUnicode);
document.draw("C:\\temp\\MydocumentJava.pdf");
Thanks,
ceTe Software Support Team.