Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange printing problem



On Thu, 14 Feb 2008, Nikola Lecic wrote:

From ghostscript-gpl's doc/Issues.htm:

 When pdfwrite device cannot open the output file it fails with:
   **** Unable to open the initial device, quitting.

(Device here means gs's option -sDEVICE=[...].)

So you can easily reproduce that error by invoking e.g. ps2pdf or
pdf2ps from a non-writable directory. Or try not to specify
-sOutputFile, like this:

 % gs -sDEVICE=pswrite abc.pdf (even in a writable directory)
 % gs -sDEVICE=pdfwrite abc.ps

and you will get the same error. Finally, you can try

 % gs -sDEVICE=pswrite -dNOPAUSE -dBATCH \
      -sOutputFile=/writable-dir/abc.ps abc.pdf

and check if gs is able to write its temporary file.

Possible workaround: try to set TEMP and/or TMPDIR to something
writable (e.g. /tmp) in your environment.

Hmmm.  Here's what magicfilter does for the postscript doc:

...
# PostScript
0 %! filter /usr/pkg/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE
-sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="deskjet 5600" -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dDuplex=false -r300 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality: PenSet=2,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=- -sPAPERSIZE=letter -
...

I think that -sOutputFile=- means to write the output to STDOUT, which should be writeable!

The same exact command works (without any redirection of TEMP or TMPDIR) interactively. So I'm wondering where ghostscript might be trying to put its temp file when invoke as an lpd filter.


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index