子兮子兮 子兮子兮

No can, but will.

目录
Linux 系统使用 CUPS 打印文件相关命令
/        

Linux 系统使用 CUPS 打印文件相关命令

  • OpenPrinting CUPShttps://openprinting.github.io/cups/

    OpenPrinting 为 Linux® 和其他类 Unix® 的操作系统开发的基于标准的开源打印系统。CUPS 使用 IPP Everywhere™ 来支持对本地和网络打印机的打印。

    The current standards-based, open source printing system developed by OpenPrinting for Linux® and other Unix®-like operating systems. CUPS uses IPP Everywhere™ to support printing to local and network printers.

  • CUPS-PDFhttps://www.cups-pdf.de/

    该软件旨在通过在 central fileserver 上提供 PDF 打印机来在异构网络中生成 PDF 文件。

    This software is designed to produce PDF files in a heterogeneous network by providing a PDF printer on the central fileserver.

安装 PDF 打印机

仅用于测试执行打印命令,实际打印请使用真实的打印机名称。

  • Ubuntu

    1sudo apt install -y cups-pdf
    
  • CentOS

    1sudo yum install -y cups-pdf
    

设置默认打印机

  • Ubuntu

    PDF 替换为实际打印机名称:

    1lpoptions -d PDF
    
  • CentOS

    Cups-PDF 替换为实际打印机名称:

    1lpoptions -d Cups-PDF
    

查看全部打印机状态及默认打印机

1lpstat -p -d

使用默认打印机打印文件

filename 替换为实际文件路径:

1lp filename

使用指定打印机打印文件

printerName 替换为实际打印机名称、filename 替换为实际文件路径:

1lp -d printerName filename



我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=wh4u6zpyhe1d