Technical article 127294

How to print to a file using CUPS?

OpenServer 6.0.0OpenServer 5.0.7UnixWare 7.1.4

Written · Last revised

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 stop

2- Edit /etc/cups/cupsd.conf file and add this line:

FileDevice Yes
3- Restart cups services
# /etc/init.d/cups start

4- Create a print file with the following permissions

# >/tmp/myfileprint
# chown lp:lp /tmp/myfileprint
# chmod 777 /tmp/myfileprint

5- Create a file printer using the following URL:

file:/tmp/myfileprinter

You 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

From the Xinuos technical article database, record 127294. Reproduced with permission. The original is at www.sco.com/ta/127294, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.