[cups] Setting up a file printer under CentOS7

Brian Potkin claremont102 at gmail.com
Thu Sep 13 06:18:13 PDT 2018


On Thu, 13 Sep 2018 at 08:29, マスターズ・イアン <ian at ncsa.jp> wrote:
>
> > 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

It's unnecessary.

> 2 .You need to set CUPS to permit writing to file.
> I added "FileDevice Yes" to /etc/cups/cups-files.conf

Now you need to restart cupsd because its configuration has changed.
No restart is needed for adding and removing queues,

> 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

"-v file:/tmp" should be "-v file:/tmp/foo". You cannot print to a directory.

> 4. You need to restart CUPS at some point.

See above. 'systemctl restart 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

The file to be sent with this command is "foo". "CUPS Linux Printer name" should
be the queue name for the Xerox printer.

> I get the error telling me there is no such file or directory.
>
> Where am I going wrong?

-- 
Brian.


More information about the cups mailing list