473,804 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List of printer exceptions?

Hi,

Does anyone know how I can read out the printer status?
I want to sent a bulk of documents to the printer (or 1 by 1) but if
something goes wrong e.g. out of paper, cartridge empty, tray open,etc I
would like to get an exception back.
Is this possible?

tia
Nov 21 '05 #1
6 2402
* "Pipo" <No****@me.co m> scripsit:
Does anyone know how I can read out the printer status?
I want to sent a bulk of documents to the printer (or 1 by 1) but if
something goes wrong e.g. out of paper, cartridge empty, tray open,etc I
would like to get an exception back.


How do you send the documents to the printer?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Anyway wich is necassary so I can get these exceptions back!
tried it so far with CrystalReports but no luck yet.

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> schreef in bericht
news:2o******** ****@uni-berlin.de...
* "Pipo" <No****@me.co m> scripsit:
Does anyone know how I can read out the printer status?
I want to sent a bulk of documents to the printer (or 1 by 1) but if
something goes wrong e.g. out of paper, cartridge empty, tray open,etc I
would like to get an exception back.


How do you send the documents to the printer?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
Hi Pipo,

I am researching the issue and update you with new information ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #4
Hi Pipo,

Now I am researching the issue, and I will update you with new information
ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5
Hi Peter,

thank you, I'll wait for your results.

""Peter Huang"" <v-******@online.m icrosoft.com> schreef in bericht
news:nZ******** *****@cpmsftngx a06.phx.gbl...
Hi Pipo,

I am researching the issue and update you with new information ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #6
Hi Pipo,

I think we may need to call the win32 API to get the printer status and
print job status by using the GetPritner and GetJob API.

Here are some links you may take a look.
JOB_INFO_1
http://msdn.microsoft.com/library/de...us/gdi/prntspo
l_6gvm.asp
GetJob
http://msdn.microsoft.com/library/de...us/gdi/prntspo
l_2uci.asp

PRINTER_INFO_6
http://msdn.microsoft.com/library/de...us/gdi/prntspo
l_82cy.asp

GetPrinter
http://msdn.microsoft.com/library/de...us/gdi/prntspo
l_1gky.asp

HOW TO: Determine Printer Status and Print Job Status from Visual Basic
http://support.microsoft.com/default...b;en-us;202480

160129 HOWTO: Get the Status of a Printer and a Print Job
http://support.microsoft.com/?id=160129

228769 HOWTO: Retrieve Print Job Information
http://support.microsoft.com/?id=228769

Here is sample for VB6.
PrnInfo.zip
http://www.mvps.org/vb/index2.html?samples.htm

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #7

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

Similar topics

1
11890
by: Bruce Wood | last post by:
I'm having a devil of a time calling DeviceCapabilities() in order to get the list of paper names / codes / sizes for a printer. Here is my code and the input it produces: static extern Int32 DeviceCapabilities( string device, string port, Int16 capability, out IntPtr outputBuffer,
2
1978
by: Amrendra Nath | last post by:
Hi Friends ! Can anyone help? Its an urgent. I wanted to print PDF Document or Scanned Document Through my .aspx page .By just clicking a button.I'm not using codebehind.I want to do printing at my network printer. I'm using System.Diagnosics.Process Namespace for calling the print process at the server where i want to do my printing.I'm only able to run Command.exe and notepad process. Please help.
2
3509
by: felecha | last post by:
I learned about Exceptions in School, and now that I'm building my first real application on the job, I'm going through it trying to analyze it for all possible Exceptions so I can handle them effectively. I've been looking in the Help / Index for each Method's documentation, and looking at the listed Exceptions. I'm finding a number of methods with no Exceptions specified. Does that mean there is no possible Exception for that method?...
2
4811
by: J | last post by:
Hello, I'm using the following snippet of code to try and get a list of all the printers installed on this machine. I have installed some network printers on this machine and they just won't show up! This is in a webservice method, if that makes any differance. Also, when I change the query to "Select * from Win32_Process" I do return many processes, any ideas to what might be causing this?
0
1263
by: vpundru | last post by:
Hi, i need to get the printer list of the client in ASP.Net and need to set the printer to a particular tray to print. Regards Venkat
3
16426
by: ramhog | last post by:
I see exceptions in lots of different namespaces. Is there a complete list somewhere of all the exceptions from all the different namespaces? Thanks.
0
885
by: Iain Wilson | last post by:
Hi All I am trying my hand at printing from a web page for the first time. I have been asked to print what amounts to many pages of data in response to a button click. The scenario is as follows. 1. The user will select a Product from a Drop Down List. 2. The user will press the print button 3. Based upon the product selected in the Drop Down List I need to print data gathered
4
6076
by: Luqman | last post by:
I am using Visual studio 2008 and ASP.Net 3.5 How can I fill a combo with List of Local Printers, installed on Client Machine ? If I have to buy any Activex Control from Internet, please do recommend. Best Regards, Luqman
0
1366
by: drewgy | last post by:
Can anyone tell me how to get a list of full UNC paths for all printers on a network? I have tried using WMI but the following code only gives me a list of local printers, and doesn't give me the fully qualified paths. private void GetNetworkPrinters() { try { string strQuery = "SELECT * FROM Win32_Printer";
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.