在.NET中打印公司徽标 [英] printing companys logo in .NET
问题描述
我需要在打印预览页面打印公司徽标。
//绘制标题
e.Graphics.DrawString( _ReportHeader,
new Font(gw.Font,FontStyle.Bold),
Brushes.Black,e.MarginBounds.Left,
e。 MarginBounds.Top - e.Graphics.MeasureString(_ReportHeader,
new Font(gw.Font,FontStyle.Bold),
e.MarginBounds.Width).Height - 50 );
这就是我打印标题文字的方式。但我想得到图像形式源或数据库打印..
i need to print the company logo in the print preview page.
//Draw Header
e.Graphics.DrawString(_ReportHeader,
new Font(gw.Font, FontStyle.Bold),
Brushes.Black, e.MarginBounds.Left,
e.MarginBounds.Top - e.Graphics.MeasureString(_ReportHeader,
new Font(gw.Font, FontStyle.Bold),
e.MarginBounds.Width).Height - 50);
this is how i print header text. but i want to get image form source or database to print..
推荐答案
只需创建一个System.Drawing.Image(或Bitmap)对象,然后使用e打印它.Drawing.DrawImage方法。
Just create an System.Drawing.Image (or Bitmap) object and then print it using e.Drawing.DrawImage method.
这篇关于在.NET中打印公司徽标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!