Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Aug 27, 2014 1:28 pm

Dears,
is any idea how to implement code page to created pdf document ?

PdfDocument doc = new PdfDocument();
doc.LoadFromFile("fileTemplate.doc");
PdfPageBase page = doc.Pages[0];
PdfFont p_font = new PdfFont(PdfFontFamily.Courier, 7f);
PdfSolidBrush p_brush=new PdfSolidBrush(Color.Black);

page.Canvas.DrawString("zażółćgęśląjaźń ZAŻÓŁĆGĘŚLĄJAŹŃ", p_font, p_brush, 0, 0);

resul is pdf file with :

"za¿ó³ægêoel¹jaŸñ ZA¯Ó£ÆGÊOEL¥JA•Ñ"

gemsi
 
Posts: 2
Joined: Wed Aug 27, 2014 1:15 pm

Thu Aug 28, 2014 3:17 am

Dear gemsi,

Thanks for your inquiry.

For your requirement, please refer to the following code:
Code: Select all
PdfDocument doc = new PdfDocument();
PdfPageBase page = doc.Pages.Add();
Font font=new Font("Courier",20f);
PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(font,true);
PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
page.Canvas.DrawString("zażółćgęśląjaźń ZAŻÓŁĆGĘŚLĄJAŹŃ", trueTypeFont, brush, 0, 100);

Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Aug 28, 2014 6:36 am

thanks a lot, it's working great

regards

gemsi
 
Posts: 2
Joined: Wed Aug 27, 2014 1:15 pm

Fri Aug 29, 2014 1:38 am

You're welcome.
Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.PDF