一、前置准备:安装打印机驱动与CUPS服务
在Debian系统中使用LibOffice打印前,需确保已安装CUPS(Common Unix Printing System)及对应打印机驱动。CUPS是Linux下管理打印任务的标准系统,驱动程序则确保LibOffice能识别打印机。
sudo apt-get update
sudo apt-get install cups cups-client cups-bsd foomatic-filters
hpijs和hplip):sudo apt-get install hpijs hplip # HP打印机示例
sudo systemctl start cups
sudo systemctl enable cups
若需通过网络共享打印机,需编辑CUPS配置文件(/etc/cups/cupsd.conf),修改以下内容并重启CUPS:Listen 0.0.0.0:631 # 允许所有IP访问
<Location />
Order allow,deny
Allow From all
</Location>
sudo systemctl restart cups
注:若使用网络打印机,需确保Debian主机与打印机在同一局域网,且防火墙允许631端口流量。
二、在LibOffice中配置打印机
Ctrl+P直接打开打印对话框;三、预览与打印
http://localhost:631)查看打印任务状态。四、常见问题排查
sudo systemctl status cups),或重新添加打印机(确保CUPS中已配置)。dpkg命令安装。lpadmin组:sudo usermod -aG lpadmin 当前用户名
注:修改组后需注销并重新登录生效。