Bug 690761 - Assign Printer Name with sOutputFile not working with -sDEVICE=mswinpr2 while print PDF file
Summary: Assign Printer Name with sOutputFile not working with -sDEVICE=mswinpr2 whi...
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Client API (show other bugs)
Version: 8.70
Hardware: PC Windows XP
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-11 06:00 UTC by sankar
Modified: 2021-10-09 12:18 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sankar 2009-09-11 06:00:29 UTC
Hi,

I am developing one application that print PDF files silently in background
process. I decided to use Ghostscript complete that task. When i use this
setting '-sDEVICE=mswinpr2' every time Printer dialog opens and ask to choose
the printer.

I assigned the printer name also in sOutputFile setting but no luck. 

Syntax of setttings :

-sDEVICE=mswinpr2
-sOutputFile="%printer%HP Deskjet F4100 series"

also i tried this also

-sDEVICE=mswinpr2
-sOutputFile="\\spool\%printer%HP Deskjet F4100 series"

So can you please guide me to complete my task in best way.

Thanks & Regards,
Sankar B,
Versatile-Soft.com
Comment 1 Ray Johnston 2009-09-24 09:56:52 UTC
I suspect that most of this is documented in doc/Devices.htm#Win

I'll take this bug and handle it.
Comment 2 sankar 2009-09-24 20:51:56 UTC
Thanks Ray, Thanks for handle my bug.

please let me know if you need any other details.

Thanks & Regards,
Sankar B
Comment 3 Hin-Tak Leung 2009-11-03 16:44:02 UTC
It has been years since I used ghostscript on windows seriously, but I believe
it is easier to script non-interactive use of gs via gsprint (part of gsview
family)?
Comment 4 Kannan 2012-03-15 22:07:54 UTC
I had the same issue with 8.64, I used -sDevice = ljet4.

-sDEVICE=ljet4
-sOutputFile="\\spool\%printer%HP Deskjet F4100 series" and it's working fine.

Does this mean the printing will be successfull only if the printer is ljet4 ?

what happens if it's printing to other windows printer ?

Can some one help me please.
Comment 5 Ken Sharp 2021-10-09 12:18:51 UTC
If the printer chooser dialog pops up, this indicates that Ghostscript couldn't find the named printer. In every case I've had reported to me in the past this runs out to be because the printer name is incorrect in some way.

Often this turns out to be using %printer% in a batch file, or other case where the command processor replaces the %p with something else.

If this can be reproduced reliably, please open a new bug report.

Note; as far as I know you can use *either* \\spool *or* %printer%. Using both won't work.