473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How can I catch printer errors (eg, "out of paper", etc)?

My program must check printer status before sending a job. Does anyone
have a clue?
Thanks,
Trint

Nov 16 '05 #1
5 5188
Are you opening the windows print dialog or you implementing your own print
method?

"trint" <tr***********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
My program must check printer status before sending a job. Does anyone
have a clue?
Thanks,
Trint

Nov 16 '05 #2
Own print method:
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = printerName;
//printerSettings.PaperSources = "Tray 2";
PrintDocument pd = new PrintDocument();
m_currentPrintingPage = 1;
m_lastPrintingPage = m_numberOfPages;
pd.PrinterSettings = printerSettings;

I think this is where it should go. But I'm not sure.
Any help is appreciated.
Thanks,
Trint

Landi wrote:
Are you opening the windows print dialog or you implementing your own print method?

"trint" <tr***********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
My program must check printer status before sending a job. Does anyone have a clue?
Thanks,
Trint


Nov 16 '05 #3
try this
http://www.codeproject.com/csharp/printeroffline.asp

"trint" <tr***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Own print method:
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = printerName;
//printerSettings.PaperSources = "Tray 2";
PrintDocument pd = new PrintDocument();
m_currentPrintingPage = 1;
m_lastPrintingPage = m_numberOfPages;
pd.PrinterSettings = printerSettings;

I think this is where it should go. But I'm not sure.
Any help is appreciated.
Thanks,
Trint

Landi wrote:
Are you opening the windows print dialog or you implementing your own

print
method?

"trint" <tr***********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
My program must check printer status before sending a job. Does anyone have a clue?
Thanks,
Trint

Nov 16 '05 #4
Thanks, I will try...is that just if the printer is offline?
Trint

Landi wrote:
try this
http://www.codeproject.com/csharp/printeroffline.asp

"trint" <tr***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Own print method:
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = printerName;
//printerSettings.PaperSources = "Tray 2";
PrintDocument pd = new PrintDocument();
m_currentPrintingPage = 1;
m_lastPrintingPage = m_numberOfPages;
pd.PrinterSettings = printerSettings;

I think this is where it should go. But I'm not sure.
Any help is appreciated.
Thanks,
Trint

Landi wrote:
Are you opening the windows print dialog or you implementing your
own print
method?

"trint" <tr***********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
> My program must check printer status before sending a job.
Does anyone
> have a clue?
> Thanks,
> Trint
>


Nov 16 '05 #5
I am sure it's not. You should be able to replace the workingoffline string
with what you want and it should work. Never tried though.
Landi

"trint" <tr***********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Thanks, I will try...is that just if the printer is offline?
Trint

Landi wrote:
try this
http://www.codeproject.com/csharp/printeroffline.asp

"trint" <tr***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Own print method:
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.MaximumPage = m_numberOfPages;
printerSettings.MinimumPage = 1;
printerSettings.PrintRange = PrintRange.SomePages;
printerSettings.FromPage = 1;
printerSettings.ToPage = m_numberOfPages;
printerSettings.PrinterName = printerName;
//printerSettings.PaperSources = "Tray 2";
PrintDocument pd = new PrintDocument();
m_currentPrintingPage = 1;
m_lastPrintingPage = m_numberOfPages;
pd.PrinterSettings = printerSettings;

I think this is where it should go. But I'm not sure.
Any help is appreciated.
Thanks,
Trint

Landi wrote:
> Are you opening the windows print dialog or you implementing your own print
> method?
>
> "trint" <tr***********@gmail.com> wrote in message
> news:11*********************@z14g2000cwz.googlegro ups.com...
> > My program must check printer status before sending a job. Does anyone
> > have a clue?
> > Thanks,
> > Trint
> >

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: MS News \(MS ILM\) | last post by:
Hello, No one answered this yet, will you By TonyG 8/23/2003 3:45 AM My site uses the fairly standard approach of trapping errors in the Application_Error event and dealing with them there. ...
185
by: Martin Jørgensen | last post by:
Hi, Consider: ------------ char stringinput ..bla. bla. bla. do {
6
by: quanghoc | last post by:
Hi all, I used XMLSpy to validate my XML but it catched one error at a time. Is there anyway to make XMLSpy to catch all errors at once. If XMLSpy does not have this feature, what software out...
0
by: Manpreet Singh Khurana | last post by:
Hi, I am using paramiko 1.5.3 with python 2.4 and pycrypto 1.9 I need to know if it is possible to catch sysytem level error, like "disk space full" or "cpu usage indication" etc. Any help...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.