CUPS

centos7下cups + samba共打印服务

浪尽此生 提交于 2019-12-02 16:09:09
centos7下cups + samba共打印服务 2015年8月21日 admin 发表评论 阅读评论 这个算是rhce课程的篇外篇,Samba除了提供文件共享外,也可以像windows下的共享一样提供打印机共享。在进一步深入之前,先了解下CUPS服务,cups作为Linux下管理打印的服务应用,其支持IPP、LPD、SMB和JetDirect接口。cups服务本身也可以实现打印共享,不过在windows下增加cups共享打印机的步骤相对不麻烦,可以利用Samba先连接本地cups服务,再由samba提供打印共享服务。 一、cups服务配置 1、安装cups相关软件包 # yum -y install cups 2、编辑cups服务配置 # vim /etc/cups/cupsd.conf #将Listen localhost:631修改为 Listen 0.0 . 0.0 : 631 //监听所有 IP #默认是不允许远程主机浏览器打开访问的,这里将allow、deny顺序对调下,或者后面加allow from * < Location /> #Order allow,deny //默认配置部分 Order deny , allow //修改后的内容 </ Location > #设置admin项只允许某台主机或某段主机访问 < Location / admin > Order

Vagrant port forwarding not working. Cups not accesible from host

我的梦境 提交于 2019-12-01 22:39:01
So I'm working with vagrant and I'm trying to use it as a printing server. I installed cups. Internally everything works just fine. I can even make a quick curl to my localhost:631 (cups port inside my vagrant) and there's everything. The thing is I cant access it in any way I try from the host machine. Obviously I forwarded the port and I've tried with several ports. I've also tried with Debian squeeze and Ubuntu 12.04. Here is my current Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "guruDebian" config.vm.network :forwarded_port, guest: 80, host: 8080 config.vm.network

Creating a raw printer queue in CUPS (host) and adding them through CUPS (client)

佐手、 提交于 2019-11-30 07:31:30
I want to make my RasPi act as a little print and file server in a small home network consisting of three Linux clients. Unfortunately, Brother provides only binary drivers for x86, so I cannot run my Brother printer on the RasPi. However, I found a blog entry proposing to create a raw queue on the RasPi's CUPS install and access this queue from the clients using binary drivers installed on them. Here is the blog entry: http://chemdroid.net/en/raspberry-pi/36-raspberry-pi-as-print-server Unfortunately, the author doesn't describe in much details how to create a raw queue on the RasPi and how

linux下CUPS学习心得

北城余情 提交于 2019-11-29 06:37:26
CUPS学习报告 首先,我们学习CUPS之前,我们应当了解一下LINUX打印原理: 普通文件和各类图形文件经过适当的转换器转化成PostScript文件,在由GhostScript转换成打印机语言 打印机流程: 在打印过程中,通常是程序产生输出并以管道的方式传送给LPR ,或者直接用LPR打印一个文件,LPR与打印机后台程序通过网络链接,传输相应的数据与选项,打印机后台服务程序在相应的spooler目录存储,在可以打印的情况下将任务传输给打印机。 最近看了CUPS的官网,了解了相关架构,在这里记录一下所学内容。 首先,什么是CUPS。CUPS是围绕中央打印调度过程设计的,分派打印作业,处理管理命令,向本地和远程程序提供打印机状态信息,并根据需要通知客户。CUPS提供了完整的基于IPP/1.1的打印系统,包括basic,digest和本地认证验证,用户,域,基于IP的访问控制,128位加密。CUPS除了提供标准的打印命令,还提供了Berkeley(lpr)和system(lp)打印命令。 就目前而言,打印机有三种模式: 第一种,直接将PostScript文件给CUPS的后台,再将打印流传输到打印机去处理,通常而言,这种打印机价格不菲。 第二种,是交给CUPS的内部程序处理,将PostScript转化成raster格式到打印机接口,这种方式驱动不多 第三种

printing over network from PHP app

风格不统一 提交于 2019-11-28 07:02:55
I have a set of printers connect over a network with Static IP assigned to each printer. Now i have a PHP web application running on a linux server which needs to send print jobs, to these printer over the network. Is this possible using lpr or cups and how do i go about it. You could use the LPR Printer class from here: http://www.phpclasses.org/package/2540-PHP-Abstraction-for-printing-documents.html Example: <?php include("PrintSend.php"); include("PrintSendLPR.php"); $lpr = new PrintSendLPR(); $lpr->setHost("10.0.0.17"); //Put your printer IP here $lpr->setData("C:\\wampp2\\htdocs\\print\

Programming a Filter/Backend to 'Print to PDF' with CUPS from any Mac OS X application

前提是你 提交于 2019-11-28 04:13:34
Okay so here is what I want to do. I want to add a print option that prints whatever the user's document is to a PDF and adds some headers before sending it off to a device. I guess my questions are: how do I add a virtual "printer" driver for the user that will launch the application I've been developing that will make the PDF (or make the PDF and launch my application with references to the newly generated PDF)? How do I interface with CUPS to generate the PDF? I'm not sure I'm being clear, so let me know if more information would be helpful. I've worked through this printing with CUPS

printing over network from PHP app

 ̄綄美尐妖づ 提交于 2019-11-27 01:46:28
问题 I have a set of printers connect over a network with Static IP assigned to each printer. Now i have a PHP web application running on a linux server which needs to send print jobs, to these printer over the network. Is this possible using lpr or cups and how do i go about it. 回答1: You could use the LPR Printer class from here: http://www.phpclasses.org/package/2540-PHP-Abstraction-for-printing-documents.html Example: <?php include("PrintSend.php"); include("PrintSendLPR.php"); $lpr = new

Programming a Filter/Backend to 'Print to PDF' with CUPS from any Mac OS X application

一笑奈何 提交于 2019-11-27 00:18:48
问题 Okay so here is what I want to do. I want to add a print option that prints whatever the user's document is to a PDF and adds some headers before sending it off to a device. I guess my questions are: how do I add a virtual "printer" driver for the user that will launch the application I've been developing that will make the PDF (or make the PDF and launch my application with references to the newly generated PDF)? How do I interface with CUPS to generate the PDF? I'm not sure I'm being clear,

Java 中初始化 List 集合的 6 种方式!

ぃ、小莉子 提交于 2019-11-26 16:30:01
List 是 Java 开发中经常会使用的集合,你们知道有哪些方式可以初始化一个 List 吗?这其中不缺乏一些坑,今天栈长我给大家一一普及一下。 1、常规方式 List<String> languages = new ArrayList<>(); languages.add("Java"); languages.add("PHP"); languages.add("Python"); System.out.println(languages); 这种就是我们平常用的最多最平常的方式了,没什么好说的,后面缺失的泛型类型在 JDK 7 之后就可以不用写具体的类型了,改进后会自动推断类型。 2、Arrays 工具类 List<String> jdks = asList("JDK6", "JDK8", "JDK10"); System.out.println(jdks); 注意,上面的 asList 是 Arrays 的静态方法,这里使用了静态导入。这种方式添加的是不可变的 List, 即不能添加、删除等操作,需要警惕。。 import static java.util.Arrays.asList; 如果要可变,那就使用 ArrayList 再包装一下,如下面所示。 List<String> numbers = new ArrayList<>(Arrays.asList("1", "2"