I'm using the below code to print a document , so my question is how do i get notified when the printer runs out of paper or ink using c#?
C# code
PrintDocument pd = new PrintDocument();
PrintController pc = new StandardPrintController();
pd.PrintController = pc;
pd.PrintPage += new PrintPageEventHandler(pqr);
pd.Print();
void pqr(object o, PrintPageEventArgs e)
{
var path1 = @"e:\abc.jpeg";
System.Drawing.Image i = System.Drawing.Image.FromFile(path1);
Point p = new Point(0, 0);
e.Graphics.DrawImage(i, p);
}
Member
6 Points
71 Posts
how to get notified when a printer runs out of paper using c#?
Jun 02, 2014 04:32 PM|jeeva99|LINK
Hi All
I'm using the below code to print a document , so my question is how do i get notified when the printer runs out of paper or ink using c#?
C# code
PrintDocument pd = new PrintDocument();
PrintController pc = new StandardPrintController();
pd.PrintController = pc;
pd.PrintPage += new PrintPageEventHandler(pqr);
pd.Print();
void pqr(object o, PrintPageEventArgs e)
{
var path1 = @"e:\abc.jpeg";
System.Drawing.Image i = System.Drawing.Image.FromFile(path1);
Point p = new Point(0, 0);
e.Graphics.DrawImage(i, p);
}
thanks in advance
Jeeva
Contributor
2564 Points
1919 Posts
Re: how to get notified when a printer runs out of paper using c#?
Jun 03, 2014 02:49 AM|mike4u|LINK
refer this:
http://www.codeproject.com/Articles/74359/Ask-for-and-receive-change-notifications-from-a-pr
http://stackoverflow.com/questions/10832719/how-to-know-that-the-paper-is-out-on-epson-thermal-printer-model-tm-88iv
None
0 Points
1 Post
Re: how to get notified when a printer runs out of paper using c#?
Feb 26, 2018 09:28 AM|Rustia|LINK
how to get notified when a printer runs out of paper using vb.net?