- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用打印机在本地打印 pdf 文件。这是一段代码,已尝试打印。
fs.readFile('documents/AccountStatement.pdf', function(err, data) {
if (err)
throw err;
var printer = ipp.Printer("http://hostname:631/ipp/printer");
var msg = {
"operation-attributes-tag": {
"requesting-user-name": "KUMA1936",
"job-name": "My Test Job",
"document-format": "application/pdf"
},
data: data
};
printer.execute("Print-Job", msg, function(err, res){
console.log(res);
console.log(err);
});
});
上面的代码中printer.execute()方法和“Print-Job”参数的作用是什么。这里的 631 是什么意思。当我打印资源时,它显示
{ 版本:'1.1', statusCode: '服务器错误操作不支持', 编号: 442076, '操作属性标签': { '属性字符集': 'utf-8', '属性自然语言': 'en-us' } }错误为空。
最佳答案
您可以查看API docs 。第一个参数(字符串)是 IPP 定义的操作。给出了有关 Print-Job
操作的描述 here
3.2.1 Print-Job Operation
This REQUIRED operation allows a client to submit a print job with
only one document and supply the document data (rather than just a
reference to the data). See Section 15 for the suggested steps for
processing create operations and their Operation and Job Template
attributes.
您可以查看其他 IPP 支持的操作 here 。 631 是用于 IPP 的接受端口,它使用 TCP。
您可以查看有关错误 here 的更多信息,显示:
13.1.5.2 server-error-operation-not-supported (0x0501)
The IPP object does not support the functionality required to fulfill
the request. This is the appropriate response when the IPP object
does not recognize an operation or is not capable of supporting it.
See sections 3.1.6.1 and 3.1.7.
这意味着您的代码中没有错误。您的打印机很可能未配置或不支持 IPP。最后但并非最不重要的一点是,必须为 IPP.Printer
提供打印机 IP。因此,请检查您提供的 IP 是否有效(您的代码显示您提供了主机名)。来自项目page给出:
To find out if your printer supports IPP:
- Google your printer's specs
- Try: telnet YOUR_PRINTER 631. If it connects, that's a good sign.
- Use the '/examples/findPrinters.js' script.
关于node.js - Nodejs 的互联网打印协议(protocol) (IPP),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16194758/
IPP 是否对其处理的数据(例如对齐等)提出了任何要求? 最佳答案 在 Windows 上,使用 x86 二进制文件(这是我目前使用的全部),您不需要对齐内存,但 userguide_win_ia32
我有一个设备/电器,您无法为其安装驱动程序。我想通过让用户添加 IP 地址来添加支持网络/IPP/AirPrint 打印机的功能。 由于我不通过 Windows 进行打印(这将使用 IPP),我该如何
IPP <= 7.1 具有特殊的就地函数。 在 IPP 8 中,它们已被弃用:deprecation-summary 尚不清楚新的异地函数是否也支持就地操作。 我的猜测是,对于某些函数,可以为 src
我正在阅读这篇有趣的文章 article关于 IPP 调度程序。在某些地方它写道:调度指的是在运行时检测 CPU 功能然后选择与您的 CPU 相对应的英特尔 IPP 优化库集的过程。例如,在\ia32
我正在试验 Intel Integrated Performance Primitives (IPP) ,我很好奇在 IPP 中进行 2D 卷积的“正确方法”。 根据英特尔 IPP 文档,ippiCo
我已直接向 Intel 查询,但仍处于待定状态。基本上我已经非常严格地搜索了互联网,但无法确定异步库是否描述了 here可作为从 here 下载的库的一部分使用. 注意:我实际上安装了学生版的Inte
目前我们在我们的应用程序中使用 IPP 5.2,我尝试将其替换为带有 Nuget 包的 IPP 2019。我不明白 resize with CUBIC 在 IPP 5.2 和 IPP 2019 之间的
我遇到了 CUPS-Get-Devices 缺少必需属性的问题。基本上,我想使用 https://www.npmjs.org/package/ipp 获取带有 IPP 和 CUPS 的可用打印机列表。
我正在尝试更新 1500 个 QuickBooks Online 库存项目的现有数量。我可以从商店中提取 1500 种产品。 这个更新可以做吗?我看到手头没有数量的物品: https://develo
我得到了这份工作:1。产生一个正弦信号。2。使用 FFT 构建其频谱。首先,我为 visual studio 2010 安装了 Intel Parallel Studio XE 2011。在 vs 2
是否可以使用 ajax 从浏览器发送 IPP 打印请求? 我假设它看起来像这样: // Data to be sent var data = "Testing\nTesting\n1\n2\n3";
我有不是自己写的源码,联系不上作者。它是用 C++ 编写的,需要 libjpeg、boost 和 Intel Performance Primitives。 编译是一件苦差事,但经过几天的问题解决后,
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求提供代码的问题必须表现出对所解决问题的最低限度理解。包括尝试过的解决方案、为什么它们不起作用,以及
我在 Linux 中编写了一个转换声音的程序。我使用英特尔 IPP(集成性能原语)库。我添加了 ipps 和 ippcore 库: LIBS += -L$$PWD/../../../../opt/in
我已经在我的机器上安装了英特尔 IPP,我遵循了具体的步骤,您可以在这里找到它: http://software.intel.com/en-us/articles/intel-integrated-p
我在使用 ipp 支持构建 opencv 时遇到了一些问题。我在 debian squeeze 32 位和最新的 ipp 英特尔版本(完整的 composer 包)上使用 cmake-gui。 我认为
我正在做一些 C++ 优化工作,需要没有任何平均偏移或规范化缩放操作的普通版互相关。我知道在图像数据的正常情况下,使用上述方法可以消除亮度的影响,因此只能识别结构相似性,但在我们的应用程序中实际上需要
我正在阅读英特尔的 Integrated Performance Primitives C 和 C++ 库。他们提到外线程是新功能之一。 New API’s for external threadin
目前,我正在尝试以编程方式获取开始打印作业的用户的名称到映射的IPP printer . 我正在为 JOB_INFO_2 structure 的事实而苦苦挣扎的成员 pUserName 包含用于连接到
我正在尝试使用 IPP(Internet 打印协议(protocol))在第二个纸盘上打印文档。我正在使用这个 npm IPP-Library . 但在任何时候我尝试打印文档时,我的打印机都会显示一条
我是一名优秀的程序员,十分优秀!