-
-
Save jfqd/43edea93229035ce2e12683396c56f82 to your computer and use it in GitHub Desktop.
Installing CUPS printer on Debian and add PDF printer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get -y install cups | |
sudo apt-get -y install cups-pdf | |
# add pdf printer to cups | |
# - named files end up in ~/PDF/ | |
# - unnamed files are stored in /var/spool/cups-pdf/ANONYMOUS/, such as PDF:s created by streaming bytes over an API | |
sudo lpadmin -p cups-pdf -v cups-pdf:/ -E -P /usr/share/ppd/cups-pdf/CUPS-PDF.ppd | |
# Check success | |
lpstat -t | |
# List printers and whcih one is teh default printer | |
lpstat -p -d | |
# Print file to named printer (check in ~/PDF for testfile.pdf) | |
lp -d PDF testfile.txt | |
# Docs | |
# Intro/basics: http://www.linuxjournal.com/article/8618 | |
# Conf tips | |
# http://www.debianadmin.com/setup-cups-common-unix-printing-system-server-and-client-in-debian.html | |
# Add a printer on the command line – cups-pdf example | |
# http://blog.nguyenvq.com/blog/2011/05/12/cups-pdf-example/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment