[cups] Setting up a file printer under CentOS7

Gernot Hassenpflug aikishugyo at gmail.com
Wed Sep 12 19:26:14 PDT 2018


On Thu, Sep 13, 2018 at 11:22 AM, マスターズ・イアン <ian at ncsa.jp> wrote:

> Gernot and Brian
>
> Thanks for the replies.
>
> I'm not totally following the conversation between the two of you,
> because, as previously mentioned, I'm a CUPS newbie.
>
> After reading both your posts, I'm not quite sure what the consensus for
> creating a file printer is ...
>
> Also I hope you don't mind that I changed the title of this sub-thread as
> the original thread is getting harder to follow.
>

No problem.

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.
That is about it.
Gernot Hassenpflug




>
> Thanks
>
> ian
>
> On 2018/09/13 8:29, Gernot Hassenpflug wrote:
>
>> On Thu, Sep 13, 2018 at 3:09 AM, Brian Potkin <claremont102 at gmail.com>
>> wrote:
>>
>> On Wed, 12 Sep 2018 at 15:50, Gernot Hassenpflug <aikishugyo at gmail.com>
>>> wrote:
>>>
>>> [...]
>>>
>>> To set up a test printer:
>>>>
>>>> 1) Add support for file output in /etc/cups/cupsd.conf
>>>> FileDevice Yes
>>>>
>>>
>>> OK.
>>>
>>> then restart:
>>>> /etc/init.d/cups restart
>>>>
>>>
>>> OK, but 'service cups restart' should suit a system with any init system.
>>>
>>>
>> Hi Brian, thank you for the comments. The content was pasted from 2012,
>> nice to get some updates, and fix and mistakes I may have made when
>> documenting, since I use the raw file printer all the time at home but
>> never needed to set it up again.
>>
>>
>> 2) Set up printer queue
>>>> lpadmin -p foofile -v file:/tmp/fee
>>>>
>>>
>>> This is a raw queue. Raw queues do not work with file: device queues,
>>>
>>>
>> Hmm, maybe create with "parallel" first, then edit the
>> /etc/cups/printers.conf (presumably with cups* stopped first).
>> My content for that particular printer shows:
>> DeviceURI file:/tmp/foo
>>
>>
>> .> create location:
>>>
>>>> mkdir /tmp/fee
>>>>
>>>
>>> Not needed. fee is created when printed to.
>>>
>>>
>> Yes, true. And that should not be a directory. Definitely a mistake in my
>> documentation. Files are not put in a directory, they are printed directly
>> to the file named as such.
>>
>>
>> 3) activate printer in interface:
>>>> http://localhost:631
>>>>
>>>
>>> Or use "-E" at the end of the line above when setting up the queue.
>>>
>>> 4) You can see it here:
>>>> /etc/cups/printers.conf
>>>>
>>>
>>> Or with 'lpstat -a'.
>>>
>>> where you can also change existing printers to use similar queues.
>>>>
>>>
>>> That can be done  by issuing an lpadmin command with a different
>>> destination for -v.
>>>
>>>
>> Any other comments much appreciated. I could not find any compact document
>> online detailing how to do this, so I had reposted content from an old
>> email to myself.
>> Would be good to summarize in a very quick simple and up-to-date howto
>> based on the above comments.
>>
>> Regards,
>> Gernot Hassenpflug
>> _______________________________________________
>> cups mailing list
>> cups at cups.org
>> https://lists.cups.org/mailman/listinfo/cups
>>
>>


More information about the cups mailing list