Problem
How can I print to a file using CUPS print service?
Solution
To achieve that, do the following steps:
1- Stop cups services# /etc/init.d/cups stop2- Edit /etc/cups/cupsd.conf file and add this line:
FileDevice Yes3- Restart cups services# /etc/init.d/cups start4- Create a print file with the following permissions
# >/tmp/myfileprint
# chown lp:lp /tmp/myfileprint
# chmod 777 /tmp/myfileprint5- Create a file printer using the following URL:
file:/tmp/myfileprinterYou can either create a file printer via a CUPS web interface or from command line using the "lpadmin" command.
For more details, visit www.cups.org