开发者

Encoding Problem In PrintDocument When Using Dot Matrix Printer

开发者 https://www.devze.com 2022-12-21 09:06 出处:网络
I have prepared a text to print with dot matrix printer. The text contains turkish characters like ü,ğ, etc.

I have prepared a text to print with dot matrix printer. The text contains turkish characters like ü,ğ, etc.

When I send this text to the dot matrix printer with .net' s PrintDocument class, the turkish characters on the printed document does not appear correctly. But when I send the same text to Laser printer, there is no problem. How can I solve this problem? thanks for your help.

 PrintDocument pd = new PrintDocument();
 pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
 pd.Print();

...

 static void pd_PrintPage(object sender, PrintPageEventArgs e)
   {
       Font fnt =开发者_高级运维 new Font("Courier", 10, FontStyle.Regular);
       TextRenderer.DrawText(e.Graphics, printText, fnt, new Point(0, 0), SystemColors.ControlText);
       e.HasMorePages = false;
   }
0

精彩评论

暂无评论...
验证码 换一张
取 消