使用不带驱动程序的IPP打印(IPP客户端) [英] Printing using IPP without drivers (IPP Client)

查看:1316
本文介绍了使用不带驱动程序的IPP打印(IPP客户端)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个不能为其安装驱动程序的设备/装置.我想通过让用户添加IP地址来添加支持网络/IPP/AirPrint打印机的功能.

I have a device/appliance that you cannot install drivers for. I would like to add the ability to support network/IPP/AirPrint printers by having the user add the IP Addresses.

由于我没有通过Windows(将使用IPP)进行打印,因此我如何自己使用IPP?是否有一个c#客户端(或任何Windows库)可以让您与具有IPP协议的IPP打印机进行交互?

Since I am not printing through windows (which would use the IPP), how do I use IPP myself? Is there a c# client (or any windows library) out there that allows you to interact with IPP printers with the IPP protocol?

推荐答案

有一些IPP客户端实现和IPP库可用于不同的编程语言(java/php/python).可行的解决方案是使用 http://cups.org/software.php 中提供的ipptool.一个>.创建一个名为printjob.ipp:

There are a few IPP client implementations and IPP libraries available for different programming languages (java/php/python). A practical solution could be to use the ipptool available at http://cups.org/software.php. Create an ipp-command-file called printjob.ipp:

{
 OPERATION Print-Job
 GROUP operation-attributes-tag
  ATTR charset attributes-charset utf-8
  ATTR language attributes-natural-language en
  ATTR uri printer-uri $uri
 FILE $filename
}

现在,您应该可以使用以下选项打印PDF文件:

Now you should be able to print a PDF file using these options:

ipptool -tv -f mydoc.pdf ipp://192.168.2.207 printjob.ipp

确保打印机(或打印服务器)支持您发送的文档格式.我以为您熟悉如何在应用程序中执行外部命令.

Make sure the printer (or print server) supports the document format you send. I assume you're familiar with how to execute an external command in your application.

即使CUPS提供了ipptool,它也可以与任何IPP打印机完美配合.检查 RFC 3510 或您的打印机文档以获取适当的printer-uri-方案或使用ippfind.

Even though the ipptool is provided by CUPS it works perfect with any IPP printer. Check RFC 3510 or your printers documentation for the appropriate printer-uri-scheme or use ippfind.

有经验的开发人员应该能够以其首选的编程语言和生态系统实施打印作业操作.我已经在kotlin中使用100行代码从上面实现了用例: https://github. com/gmuth/ipp-printjob-kotlin .

Experienced developers should be able to implement the print job operation in their preferred programming language and ecosystem. I have implemented the use case from above in kotlin with 100 lines of code: https://github.com/gmuth/ipp-printjob-kotlin.

这篇关于使用不带驱动程序的IPP打印(IPP客户端)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆