我尝试在热敏打印上打印图像:
void Method()
{
var printDocument = new PrintDocument();
printDocument.PrinterSettings = new PrinterSettings() { PrinterName = "zebra" };
printDocument.PrintPage += new PrintPageEventHandler(printDocument_PrintPage);
printDocument.Print();
}
void printDocument_PrintPage(object sender, PrintPageEventArgs e)
{
e.Graphics.DrawImage(System.Drawing.Image.FromFile(Server.MapPath("~/Images/orderedList6.png")), 0, 0);
}
但是没有打印文档。在打印队列中也可见文档,我可以打印到 .xps 文件。