using System.Drawing.Printing;
using System.Drawing;
void pqr(object o, PrintPageEventArgs e)
{
System.Drawing.Image i = System.Drawing.Image.FromFile("E:\\print\\winterflowers2.bmp");
Point p = new Point(100, 100);
e.Graphics.DrawImage(i, p);
}
using System.Drawing;
protected void btnPrint_Click(object sender, EventArgs e)
{
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(pqr);
pd.Print(); //u have privileges to acces the printer or install the priter.otherwise u will get the error in this line
}
{
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(pqr);
pd.Print(); //u have privileges to acces the printer or install the priter.otherwise u will get the error in this line
}
void pqr(object o, PrintPageEventArgs e)
{
System.Drawing.Image i = System.Drawing.Image.FromFile("E:\\print\\winterflowers2.bmp");
Point p = new Point(100, 100);
e.Graphics.DrawImage(i, p);
}
No comments:
Post a Comment