We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Create chinese character use in PDF

Hi, can i use the create chinese character on pdf?
If not, can i use Doc/Xls/Html convert to pdf and show the create chinese character?

Because i already try to use PdfGraphics.DrawString and DocToPDFConverter.ConvertToPDF, but the pdf can't show the create chinese character.

Did i use the wrong function?

Regards,
Ziv

5 Replies

AG Angappan G Syncfusion Team April 26, 2010 03:10 PM UTC

Hi Ziv,

Thank you for your interest in Essential Studio.


We can use the PdfCJKStandardFont class to draw the chinese characters in a pdf document.Please refer the sample for more details.

Sample Link:
http://files.syncfusion.com/samples/PDF.Windows/ChineseFonts.zip

Please let us know if you have any queries.

Regards,
Angappan.


ZI Ziv April 27, 2010 01:06 AM UTC

Hi Angappan,

I know the pdf can draw chinese font, but my question is the chinese character not built in chinese font can't display in the pdf.

I use the "TrueType造字程式" to create a new chinese character on all built in font, when i type new chinese character in the word/txt is ok, but word/txt export to PDF is empty character.

Regards,
Ziv


AG Angappan G Syncfusion Team April 27, 2010 01:46 PM UTC

Hi Ziv,

Thank you for your interest in Essential Studio.

Could you please report these issues through Direct Trac Developer Support Systemhttps://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

could you please attach the sample document in which you have faced the issue, with your incident.This will help us in further investigating this issue.

Please let us know if you have any queries.

Regards,
Angappan.


ZI Ziv April 28, 2010 01:30 AM UTC

Hi Angappan,

The attachment is my snapshot of this issue.
pic1.png - create new chinese character
pic2.png - new character connect to all fonts
pic3.png - my window form, use the text on the white textbox
pic4.png - new pdf result
pic5.png - the word file
pic6.png - doc to pdf result

My environment is,
Windows 2003 R2
Syncfusion 7.4.0.20

Below is my code.
//Create a new pdf
PdfDocument doc = new PdfDocument();
PdfPage page = doc.Pages.Add();
PdfGraphics g = page.Graphics;
PdfBrush brush = new PdfSolidBrush(Color.Black);
PdfFont font = new PdfTrueTypeFont(new Font("PMingLiU", 12), true);
g.DrawString(tbText.Text, font, brush, new PointF(20, 20));
if (File.Exists(tbFile.Text))
File.Delete(tbFile.Text);
doc.Save(tbFile.Text);

//doc to pdf
WordDocument wordDoc = new WordDocument(@"C:\TestPDF.doc");
DocToPDFConverter converter = new DocToPDFConverter();
PdfDocument pdfDoc = converter.ConvertToPDF(wordDoc);
pdfDoc.Save(@"C:\DoctoPDF.pdf");
MessageBox.Show("OK!");





pic_5404e39.zip


AG Angappan G Syncfusion Team May 4, 2010 12:03 PM UTC

Hi Ziv,

Thank you for your interest in Essential Studio.

Presently we support only the TrueTypeFonts (*.ttf).As the fonts that you have given is not a TrueTypeFont, text drawn using those font cannot be rendered in the generated pdf.Our current implementation is based on the below specification.

http://www.microsoft.com/typography/otspec/otff.htm#otttables

Please let us know if you have any queries.

Regards,
Angappan.

Loader.
Live Chat Icon For mobile
Up arrow icon