Ive included my printcap for ps2pdf
and also the full script.
Have fun.
/Mikkel Fischer
Here is my printcap:
pdf:
:lp=/dev/null
:sd=/var/spool/lpd/%P
:force_localhost
:filter= -$ /usr/libexec/filters/ps2pdf.pl $n
Below is my ps2pdf.pl script, it works for me so hopefully it works
for you too.
#!/usr/bin/perl
#defines
$domain ="\@it-c.dk";
$login ="";
$i =0;
#end defines
#read arguments
while($ARGV[$i]){
$arg=$ARGV[$i];
if ($arg=~ /-n/ ) { $login = substr $arg,2;}
$i=$i+1;
}
# make temporary files
$seed = `/bin/mktemp /tmp/XXXXXX`;
chomp $seed;
$ps_file = "$seed\.ps";
$pdf_file = "$seed\.pdf";
#pipe standard out to ps_file
system("/bin/cat > $ps_file");
#make ps to pdf conversion
system("/usr/bin/ps2pdf $ps_file $pdf_file");
#mail the converted document
if ($login ne "") {
$cmd = "/usr/bin/metasend -b -f $pdf_file -m application/pdf -s PDF -S
4000000 -t $login$domain";
system("$cmd");
}
#clean up we are done
system("rm $ps_file");
system("rm $pdf_file");
system("rm $seed");
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------