今天发现一个 CUPS-PDF( cups-pdf de/) 项目,可以为 CUPS( zh.wikipedia 组织网/wiki/CUPS)(Common Unix Printing System)添加 PDF 打印机。
步骤非常简单:
sudo apt install -y cups-pdf
sudo chown root:root /usr/lib/cups/backend/cups-pdf
sudo chmod 0700 /usr/lib/cups/backend/cups-pdf
sudo systemctl restart cups.service
### Key: Out (config)
## CUPS-PDF output directory
## special qualifiers:
## ${HOME} will be expanded to the user's home directory
## ${USER} will be expanded to the user name
## in case it is an NFS export make sure it is exported without
## root_squash!
## on Ubuntu, the cupsd AppArmor profile needs to be updated
## to match the output path as per instructions in LP:147551
### Default: /var/spool/cups-pdf/${USER}
Out ${HOME}/PDF
lpstat -p -d
printer PDF is idle. enabled since Sat 11 Apr 2020 09:52:10 PM HKT
system default destination: PDF
lp ~/dead.letter
request id is PDF-5 (1 file(s))
ls ~/PDF
dead.letter__2_PDF-job_5.pdf

