Hello,
I will explain my current setup:
Currently I have a printer driver setup in /etc/cups/interfaces
Which does certain things to the print job before it sends.
I wish to convert that same job to a post script file and then convert to a PDF.
This is my driver (very basic stuff):
Code:
job="$1"
user="$2"
title="$3"
numcopies="$4"
options="$5"
filename="$6"
# Set up printer default modes
echo -e "\033E\c"
echo -e "\033)0B\c"
cat "$filename"
So then I want to do something like the command enscript does.
Code:
enscript -p temp.ps file.txt
Then do ps2pdf
Code:
p2pdf temp.ps output.pdf
Basically I want to end up with a print driver that when I send text and certain options it will ether:
convert to postscript then to pdf
or
convert to postsctipt then to pdf then email out the file.
or just print to a normal printer.
so i would do something like at the command line:
lp -dprinter -email /etc/hosts
Which would convert the hosts file to postscript then to pdf then email out to an address.
Is it possible?