san*_*een 5 .net c# printing non-ascii-characters dot-matrix
我有LQ EPSON 300打印机
我想以打印机的默认字体打印一些数据
我认为如果我们使用c#代码打印该打印机的默认字体就可以了.
PrintDocument pd = new PrintDocument();
pd.DefaultPageSettings.PaperSize = new PaperSize("A4", 950, 555);
pd.PrintPage += new PrintPageEventHandler(this.FontAndLocation);
pd.Print();
private void FontAndLocation(object sender, PrintPageEventArgs e)
{
e.Graphics.DrawString(textBox1.Text.ToString(), new Font("Bookman Old Style", 18, FontStyle.Bold), Brushes.Black, 20, 95);
e.Graphics.DrawString(textBox2.Text.ToString(), new Font("Bookman Old Style", 18, FontStyle.Bold), Brushes.Black, 20, 165);
e.Graphics.DrawString(textBox3.Text.ToString(), new Font("Courier New", 18, FontStyle.Bold), Brushes.Black, 20, 265);
}
Run Code Online (Sandbox Code Playgroud)
我尝试通过互联网搜索,但我失败了,我无法解决我的问题我写的代码不打印在草稿/点阵(打印机的默认)字体.我们可以用代码或任何能够以EPSON-LQ 300默认字体打印的代码调用打印机吗?