[cups] Setting up a file printer under CentOS7

マスターズ・イアン ian at ncsa.jp
Thu Sep 13 00:28:20 PDT 2018


> You need to set CUPS to permit writing to file.
> You need to use lpadmin to create a printer using the "file" protocol.
> You need to restart CUPS at some point.

OK, after a bit more faffing around and reading
https://wiki.debian.org/DissectingandDebuggingtheCUPSPrintingSystem#Introduction ,
this is what I tried:

1. Stop CUPS (Still trying to work out if & when this is necessary):
# systemctl stop cups
    
2 .You need to set CUPS to permit writing to file.
I added "FileDevice Yes" to /etc/cups/cups-files.conf

3. You need to use lpadmin to create a printer using the "file" protocol.
So I did:
#   lpadmin -p <CUPS printer name> -v file:/tmp -E -P /etc/cups/ppd/<CUPS printer name>.ppd

4. You need to restart CUPS at some point.
systemctl start cups

If I look at the PrintToFile queue, I can see:

[root at centos7-001 ~]# lpq -P PrintToFile
PrintToFile は準備ができています
ランク  所有者  ジョブ  ファイル                        合計サイズ
1st     3496    104     2018-09-13-1558-test.txt        13312 バイ

But even though the above page says to do:
# lp -d <print_queue> -o raw <printer-ready_file>
If I do:
# lp -d <CUPS Linux Printer name> -o raw 2018-09-13-1558-test.txt
I get the error telling me there is no such file or directory.

Where am I going wrong?

Thanks

ian


More information about the cups mailing list