做一个能打印指定路径图片的C#程序
请各位帮个忙,我要做一个能够打印 ,指定路径的一个图片的程序。。。不知该怎么做
------解决方案--------------------PrintDocument doc = new PrintDocument();
doc.PrintPage += new PrintPageEventHandler(doc_PrintPage);
PrintPreviewDialog pd = new PrintPreviewDialog();
pd.Document = doc;
pd.ShowDialog(this);
void doc_PrintPage(object sender, PrintPageEventArgs e)
{
using (Bitmap bmp = Bitmap.FromFile(fileName))
{
e.Graphics.DrawImage(bmp, Rectangle.FromLTRB(0, 0, bmp.Width, bmp.Height));
}
}