Encoding Problem In PrintDocument When Using Dot Matrix Printer
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;
}
精彩评论