Summary: | Print with pswrite gives 'Could not open the file \\spool\yourprinter' | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Daniel Krüger <krda79> |
Component: | PS Writer | Assignee: | Russell Lang <gsview> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | CC: | gsview |
Priority: | P4 | ||
Version: | 8.11 | ||
Hardware: | PC | ||
OS: | OS/2 | ||
Customer: | Word Size: | --- | |
Bug Depends on: | 687562 | ||
Bug Blocks: |
Description
Daniel Krüger
2004-06-24 08:42:55 UTC
I've tested it ones more on command line with Ghostscript 8.14 on OS/2:
>>>>>
[D:\gs\gs8.14\bin]gsos2 -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=\\spool\
Kyocera1 d:\temp\24eineseite.pdf
AFPL Ghostscript 8.14 (2004-02-20)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
AFPL Ghostscript 8.14: **** Could not open the file \\spool\Kyocera1 .
Processing pages 1 through 1.
Page 1
<<<<<
Can someone please explain me the context of gx_device_open_output_file(),
positionable and parsed.iodev. The function gp_open_printer() which isn't called
can handle those "\\spool\.." filenames.
Perhaps with this information I can fix it myself.
Does it work if you use "%printer%Kyocera1" ? If inside a .cmd file, remember to use %%printer%%Kyocera1. This won't work as is on OS/2. The pswrite device is not a normal printer device, so doesn't use gp_open_printer. Using "\\spool\printer name" doesn't work with the pswrite device on Windows, and the same would occur on OS/2. On Windows, using "%printer%printer name" does work with pswrite. This %printer% IODevice is not implemented for OS/2. I'll try to write this code. Note that my testing facilities are very limited. My OS/2 computer is old and doesn't have any printers attached. Thank you for your work. It's no problem for me to test this new code. Maybe it's OT here, but I found other bugs in GSView: there is code in GSView to print multiple copies, but no GUI to change the number of copies. I can specify prolog and epilog files for pswrite printing, but these aren't mentioned nor integrated in the temporary option or PS files. I've found a solution for OS/2 that doesn't need any C-language skills. Add the following option for Ghostscript 8.14: -sOutputFile=lpt1 I assume it to work not only if invoked by GSView but from command line too. This works perfectly on my eComStation-System with the printer Xerox Phaser 8200B. While studying the spooler configuration I saw that LPT1 is redirected to the spooler. So why not telling Ghostscript to send it to lpt1 ? I've almost finished a patch that implements "%printer%PhysName" for OS/2. To Birgit: I tested -sOutputFile=lpt1 on command line. It really works. But it has a few drawbacks if used as fixed GS option in GSView. All output goes immediately to lpt1 even if I want to convert a PS or PDF file to another file format. Or if there are more printers (in a network) you want to print to. Everytime the option has to be changed. We also have a Xerox Solid Ink printer but it is connected to the USB port which is in fact significantly faster than the parallel port. I don't found a solution to print from command line to that port. This command line option would be a solution if GSView detects the port to which the selected printer is connected and print automatically to that port. To Russel: Thank you for your work. Could I get a test version? Added %printer% device. So pswrite now works with gs -sDEVICE=pswrite -sOutputFile=%printer%physname |