How to add 'Generic CUPS-PDF' Printer via Shell script ?

Forum rules
Before you post please read how to get help
Post Reply
antrrax
Level 1
Level 1
Posts: 21
Joined: Thu Sep 27, 2018 11:53 am

How to add 'Generic CUPS-PDF' Printer via Shell script ?

Post by antrrax »

I have the "printer-driver-cups-pdf" package installed and would like to add a new 'Generic CUPS-PDF' printer just by shell script without using user interface, and without user prompts

and then also set it as default printer

How to do this?
Last edited by antrrax on Thu Jan 16, 2020 7:37 pm, edited 1 time in total.
antrrax
Level 1
Level 1
Posts: 21
Joined: Thu Sep 27, 2018 11:53 am

Re: How to add 'Generic CUPS-PDF' via Shell script ?

Post by antrrax »

I was able to create a pdf printer on cups with this command

Code: Select all

lpadmin -p PDF-Printer -v cups-pdf:/ -D 'Generic CUPS-PDF-Printer' -E -P /usr/share/ppd/cups-pdf/CUPS-PDF_noopt.ppd

Sets the default printer:

Code: Select all

lpadmin -d PDF-Printer
Post Reply

Return to “Scripts & Bash”