Problem
I would like to print to a file. What steps do I need to take?
Solution
To create a file printer, follow these steps:
1) Create file to hold the output:
mkdir -p /var/lp
touch /var/lp/fileprinter
chmod 600 /var/lp/fileprinter
chown lp:lp /var/lp/fileprinter2) Create a new printer and point it to the output file:
scoadmin printer manager
Printer->Add LocalName: fileprt
Model: standard
Device: /var/lp/fileprinter3) Test to be sure you can print to it using the command:
lp -d fileprt /etc/hostsThe file /var/lp/fileprinter should contain your printjob. Additional jobs will be appended to this file.
An alternate method using the lpadmin command, instead of scoadmin:
/usr/lib/lpadmin -p fileprt -v /var/lp/fileprinter -m standard /usr/bin/accept fileprt /usr/bin/enable fileprt