print to a file

Jim anonymous at easysw.com
Thu Feb 2 11:12:04 PST 2006


> Hello,
> I would like to define a fake printer and have cups actually print to a file as if i was using cat into a file.
> Something like "cat test.txt | lp -d fakeprinter" and the out put would be equal to "cat test.txt >> filename"
>
> can this be done? and if so can someone provide me with the syntax to add to my printers.com
>
> thanks
> jb

su
mkdir /var/spool/printer
chmod 770 /var/spool/printer
touch /var/spool/printer/job.txt
chmod 644 /var/spool/printer/job.txt

vi /etc/cups/printer.conf
<Printer textprinter>
Info
Location
DeviceURI parallel:/var/spool/printer/job.txt
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

# restart cups
/sbin/service cups restart




More information about the cups mailing list