PDF Creator/Shared Printer

Dpk dpk@egr.msu.edu
Mon, 25 Sep 2000 23:13:07 -0400


On Tue, Sep 26, 2000 at 01:59:29AM +0000, Jason Watson wrote:
   
   [snip]   
   The input filter is a small script that calls ps2pdf and I think this is 
   where my problems are occuring.
   
   #!/bin/sh
   /usr/bin/ps2pdf $1 /home/samba/pdf_output/$1
   
   I set up the windows clients to use the shared pdf printer using a
   postscript printer driver.  When I print a test page the only thing
   I get is the file -w132.pdf in /var/spool/lpd/pdf.  The file is
   empty except for the standard .pdf headers.  I think the trouble is
   that the printed file is sent to the input filter using STDIN but
   I'm not sure how to send this to the ps2pdf program.  Any
   suggestions?

Should be:

  #!/bin/sh
  /usr/bin/ps2pdf - /home/samba/pdf_output/$$.pdf

$$.pdf is a cheap hack that will name the pdf file with the process
id, (i.e. 1452.pdf)  One problem is fixed by changing the first
argument to be STDIN (-), but $1 will not produce the filename
submitted.  You might search $* (the argument list to the script) for
an appropriate descriptor, such as the -j (filename) or -n (user)
option.

Dennis