在.NET中打印公司徽标 [英] printing companys logo in .NET

查看:63
本文介绍了在.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆