(Msg. 1) Posted: Mon Apr 25, 2005 9:48 am
Post subject: - How do I rename print-to-file filename at runtime? Archived from groups: microsoft>public>windowsnt>print (more info?)
I am trying to convert a bunch of different format files (.jpg/.pdf/.doc) to
..pcl (print-to-file) in a batch procedure. I've used shellexecute to open
the files (with an associated application) and then send them to a printer
that is set up to print to a particular file name (myprint.pcl)
The problem with this is that myprint.pcl is overwritten every time a new
file is being sent for printing. How can I get this resolved i.e. how can I
rename the default file name (myprint.pcl to say my_batch_file_name.pcl) at
runtime?
Ideally, I would be looking for an API that would allow me to control this
parameter (read-write) at runtime and, of course, a sample would be highly
desirable.
(Msg. 2) Posted: Thu Apr 28, 2005 11:44 pm
Post subject: Re: - How do I rename print-to-file filename at runtime? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"Dan" <dan.g RemoveThis @softhome.net> wrote in message news:<#7Om11ZSFHA.2788@TK2MSFTNGP09.phx.gbl>...
> I am trying to convert a bunch of different format files (.jpg/.pdf/.doc) to
> .pcl (print-to-file) in a batch procedure. I've used shellexecute to open
> the files (with an associated application) and then send them to a printer
> that is set up to print to a particular file name (myprint.pcl)
>
> The problem with this is that myprint.pcl is overwritten every time a new
> file is being sent for printing. How can I get this resolved i.e. how can I
> rename the default file name (myprint.pcl to say my_batch_file_name.pcl) at
> runtime?
>
> Ideally, I would be looking for an API that would allow me to control this
> parameter (read-write) at runtime and, of course, a sample would be highly
> desirable.
Hallo Dan,
you need a port monitor to do that job for you. Take a look to redmon
http://www.cs.wisc.edu/~ghost/redmon/ or build your own from Windows
DDK
port monitor example.
An another possiblitie is to change the port of the printer before
calling shellexecute. You can do that with SetPrinter, but it will not
work with simple user account.
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum