473,406 Members | 2,849 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.

Spooler File on Windows

I'm not sure if this is the right group to post this to, but here goes.
I need to find out the name of the print spool file for every job queued to
a particular printer. I actually need to read a few lines from the
spool file as well. The best I've been able to do so far is the name
of the original document, without a path to it. To get that far I had
to import some functions from winspool.

By the way, the spooled data is Postscript, so it actually is a program in
the Postscript language and readable. I need to read a few comments at the
top of the file, which in Postscript are any lines starting with "%".

-- Larry Maturo
Nov 15 '05 #1
3 8360
Hi Frank,

Thank you for your help. I've checked it out, and I can't even find the
directory for the print spooler in the registry. I did a search, and it
turns out that by default nothing is listed in the registry. You can add
keys to the registry, however, to either change the spool directory, or
specify a different directory for particular printers (or every printer,
if you like). But what I actually need is the name of the particular
print spool file for the currently executing print job, or for the last
queued print job. These names are generated randomly by windows.
Of course they are not really random, but they are unpredictable if
you don't know Microsofts algorithm.

-- Larry Maturo

"Frank Drebin" <no*****@imsickofspam.com> wrote in message
news:hK**********************@newssvr28.news.prodi gy.com...
You could probably get that from the registry - probably something like
HKLM/Software/Microsoft/WindowsNT/CurrentVersion/Print/Printers/...

I don't have a printer physically hooked up to a PC around here, so I can't check..

"Larry Maturo" <lm*****@austin.rr.com> wrote in message
news:eF******************@twister.austin.rr.com...
I'm not sure if this is the right group to post this to, but here goes.
I need to find out the name of the print spool file for every job queued

to
a particular printer. I actually need to read a few lines from the
spool file as well. The best I've been able to do so far is the name
of the original document, without a path to it. To get that far I had
to import some functions from winspool.

By the way, the spooled data is Postscript, so it actually is a program in the Postscript language and readable. I need to read a few comments at

the
top of the file, which in Postscript are any lines starting with "%".

-- Larry Maturo


Nov 15 '05 #2
Yikes, this is looking worse and worse. I've never run across an API for
that - so again, the brute-force way - is you could write a service that
monitors the spool directory (filesystemwatcher).. and whenever a file is
added, you can handle it appropriately.. this would only really work if you
tracked every file that got spooled on that machine though... hope that
helps..

"Larry Maturo" <lm*****@austin.rr.com> wrote in message
news:VK*******************@twister.austin.rr.com.. .
Hi Frank,

Thank you for your help. I've checked it out, and I can't even find the
directory for the print spooler in the registry. I did a search, and it
turns out that by default nothing is listed in the registry. You can add
keys to the registry, however, to either change the spool directory, or
specify a different directory for particular printers (or every printer,
if you like). But what I actually need is the name of the particular
print spool file for the currently executing print job, or for the last
queued print job. These names are generated randomly by windows.
Of course they are not really random, but they are unpredictable if
you don't know Microsofts algorithm.

-- Larry Maturo

"Frank Drebin" <no*****@imsickofspam.com> wrote in message
news:hK**********************@newssvr28.news.prodi gy.com...
You could probably get that from the registry - probably something like
HKLM/Software/Microsoft/WindowsNT/CurrentVersion/Print/Printers/...

I don't have a printer physically hooked up to a PC around here, so I can't
check..

"Larry Maturo" <lm*****@austin.rr.com> wrote in message
news:eF******************@twister.austin.rr.com...
I'm not sure if this is the right group to post this to, but here goes. I need to find out the name of the print spool file for every job
queued
to
a particular printer. I actually need to read a few lines from the
spool file as well. The best I've been able to do so far is the name
of the original document, without a path to it. To get that far I had
to import some functions from winspool.

By the way, the spooled data is Postscript, so it actually is a
program in the Postscript language and readable. I need to read a few comments

at the
top of the file, which in Postscript are any lines starting with "%".

-- Larry Maturo



Nov 15 '05 #3
Hi Frank,

I would love to do that, but the problem is that there are multiple
printers, and
I need to know which spool file goes with which printer. If the client buys
off
on adding registry keys and adding a seperate spool file directory for each
printer, then that's the route I'll go. If he dosen't buy off on that, I'm
looking for
an alternative solution. The point to this job is to track which printer a
particular
file got printed on, and tie it to the information in the spool file that
was added
as comments by the clients Print Processor. The normal print processor is
WinPrint, but you can add your own. That's what fax programs do. Because
the Print Processor is installed into the Windows print system, its in just
the
right place to do its magic. Unfortunately, the client did not pay for
source to
this component, and the people they paid to write it want a fortune to add
this
capability.

Again, thank you for your help.

-- Larry
"Frank Drebin" <no*****@imsickofspam.com> wrote in message
news:eM**********************@newssvr28.news.prodi gy.com...
Yikes, this is looking worse and worse. I've never run across an API for
that - so again, the brute-force way - is you could write a service that
monitors the spool directory (filesystemwatcher).. and whenever a file is
added, you can handle it appropriately.. this would only really work if you tracked every file that got spooled on that machine though... hope that
helps..

"Larry Maturo" <lm*****@austin.rr.com> wrote in message
news:VK*******************@twister.austin.rr.com.. .
Hi Frank,

Thank you for your help. I've checked it out, and I can't even find the
directory for the print spooler in the registry. I did a search, and it
turns out that by default nothing is listed in the registry. You can add
keys to the registry, however, to either change the spool directory, or
specify a different directory for particular printers (or every printer,
if you like). But what I actually need is the name of the particular
print spool file for the currently executing print job, or for the last
queued print job. These names are generated randomly by windows.
Of course they are not really random, but they are unpredictable if
you don't know Microsofts algorithm.

-- Larry Maturo

"Frank Drebin" <no*****@imsickofspam.com> wrote in message
news:hK**********************@newssvr28.news.prodi gy.com...
You could probably get that from the registry - probably something like HKLM/Software/Microsoft/WindowsNT/CurrentVersion/Print/Printers/...

I don't have a printer physically hooked up to a PC around here, so I

can't
check..

"Larry Maturo" <lm*****@austin.rr.com> wrote in message
news:eF******************@twister.austin.rr.com...
> I'm not sure if this is the right group to post this to, but here

goes. > I need to find out the name of the print spool file for every job queued to
> a particular printer. I actually need to read a few lines from the
> spool file as well. The best I've been able to do so far is the name > of the original document, without a path to it. To get that far I had > to import some functions from winspool.
>
> By the way, the spooled data is Postscript, so it actually is a program
in
> the Postscript language and readable. I need to read a few comments

at the
> top of the file, which in Postscript are any lines starting with "%". >
> -- Larry Maturo
>
>



Nov 15 '05 #4

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

Similar topics

1
by: nhmark64 | last post by:
Hi, How do wait for a print spooler to be empty? My application sucks up all the CPU cycles after i print some reports. I want to delay the CPU intensive stuff until after the print...
0
by: RDI | last post by:
I need to watch a certain print spooler and if a print job appears, extract the print data to a PRN file on the hard disk and delete it from the spooler. Can VB.Net do this? If so, can someone...
9
by: Scott M | last post by:
I'm printing a directory of about 500 multi-page tifs to a high speed printer and the spooler process is killing me!!! here is a little code..... Public Function PrintImage(ByVal...
1
by: =?Utf-8?B?QXVzdGluIFN0ZXBoZW5z?= | last post by:
In my commercial financial application I run a deposit report. I use an option to copy the report to the Clipboard. I then run a .NET consol app to “grab” the Clipboard and format the data...
1
by: =?Utf-8?B?c2hlaWxh?= | last post by:
i have a lexmark series 1200 printer that was working fine untill we installed a new ink cartridge since then we have not been able to use printer have tried all listed solutions from run services...
1
by: =?Utf-8?B?c2hlaWxh?= | last post by:
i have a lexmark 1240 printer changed ink cartridge printer has not worked since have tried going to run services print spooler hitting automatic then start shows spooler started when i go back...
1
by: =?Utf-8?B?QmV3aWxkZXJlZA==?= | last post by:
Among other issues with my printer spooler. I received the follwoing message. SPOOLSV.EXE Application error The instruction at "0x73001347" referenced memory at "0x0074169a". The memory can...
1
by: =?Utf-8?B?ZGF2aWR0aGV3ZWI=?= | last post by:
I have a recurring issue with a Print Spooler on a Windows 2000 Server. A print job will get stuck and take a large amount of the CPU time. I stop the print spooler in Services, go into Windows...
0
by: =?Utf-8?B?Sm9obg==?= | last post by:
If I'm posting in the wrong group please let me know. We've been experiencing issues with the print spooler service on our print server running Windows Server 2003 SP2. Occasionally the service...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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 projectplanning, 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.