我们正在通过谷歌云打印服务获得一些成功的打印。但是想知道是否有人在提交要打印的作业时有有关功能参数的信息,以及关于如何创建和工作这种格式的一些指针,我认为这是ppd。
我们已经能够通过使用http://www.google.com/cloudprint/printer方法获得打印机的功能,该方法返回打印机的所有值。问题是,为了定义我们想要打印的功能选项,我们不太明白我们要用它做什么。这将包括印刷页数、纸张类型和印刷质量的选择。我们可以接收到的功能信息的一个例子如下:
{
"name": "copies",
"displayName": "Copies",
"type": "ParameterDef"
}
{
"UIType": "PickOne",
"name": "HPEconoMode",
"displayName": "EconoMode",
"type": "Feature",
"options": [
{
"ppd:value": "\"\"",
"default": true,
"name": "PrinterDefault",
"displayName": "Printer's Current Setting"
},
{
"ppd:value": "\u003c\u003c/EconoMode true\u003e\u003e setpagedevice",
"name": "True",
"displayName": "Save Toner"
},
{
"ppd:value": "\u003c\u003c/EconoMode false\u003e\u003e setpagedevice",
"name": "False",
"displayName": "Highest Quality"
}
]
}发布于 2013-08-31 10:53:40
在这方面,全球合作方案的文件严重缺乏。无论如何,我发现发送打印机设置的正确参数是票证,而不是功能。参数的第一部分对应于打印对话框中的基本设置,它们非常清楚,而且值很容易更改。vendor_ticket_item数组稍微复杂一些。它包含由打印机功能描述的id/value对。id将包含来自功能的参数名称,值将包含参数选项中的一个记录的名称,或者一个数字值等,如功能中所描述的那样。
关于模式细节,请看一下我的full solution。
{
"version":"1.0",
"print":{
"color":{"vendor_id":"psk:Color","type":0},
"duplex":{"type":0},
"page_orientation":{"type":1},
"copies":{"copies":1},
"dpi":{"horizontal_dpi":600,"vertical_dpi":600},
"media_size":{"width_microns":148000,"height_microns":210000,"is_continuous_feed":false},
"collate":{"collate":true}
,
"vendor_ticket_item":[
//Printer specific settings here, from the capabilities:
{"id":"psk:JobInputBin","value":"ns0000:Tray3"},
{"id":"psk:PageICMRenderingIntent","value":"psk:Photographs"},
{"id":"psk:PageMediaType","value":"ns0000:Auto"},
{"id":"psk:JobOutputBin","value":"ns0000:Auto"},
//etc.
]
}
}https://stackoverflow.com/questions/17692706
复制相似问题