PDA

View Full Version : Print Job Details



Proph3t
27-11-2013, 11:28 AM
Hi guys

I am working at an internet cafe and I want to create a small program that will do the following:

1. As soon as a document starts printing, I want to know from which computer it is being printed, how many pages are being printed and if the current page is being printed in black or full color. I have searched on google for examples and I found 2, but unfortunately those examples did not work. It gave me the printer's properties and not the current print job's properties. The printer is working over a network. If you need any more details please ask me.

Sorry if this is posted in the wrong place, but I couldn't find any printer forums.

Thanks in advance :)

phibermon
27-11-2013, 01:16 PM
it's not just the wrong place, it's the wrong site ;)

What you are looking for will be part of the Windows API, search on Microsoft, technet etc or alternativley find an open source project that deals with print queue managment that might contain the calls you need.

Here's somewhere to get started :

http://msdn.microsoft.com/en-us/library/windows/desktop/dd162861(v=vs.85).aspx#print_job_functions

specifically this function :

http://msdn.microsoft.com/en-us/library/windows/desktop/dd162625(v=vs.85).aspx

and even more specifically the record structures JOB_INFO_1,2 and 3 returnable by that function :

http://msdn.microsoft.com/en-us/library/windows/desktop/dd145019(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd145020(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd145021(v=vs.85).aspx

Proph3t
29-11-2013, 10:00 AM
I kinda figured it's the wrong site, but this community is actually active. Anyway, thanks a lot for your quick reply. I will look into the links you have provided. ;D

pitfiend
29-11-2013, 07:28 PM
You may try looking in google groups, there's a big community that can help, Delphi Developers. Nice people, very helpful.