【问题标题】:How to set custom margin in JOB TICKET for Google Cloud Print(GCP) print job?如何在 JOB TICKET 中为 Google 云打印(GCP)打印作业设置自定义边距?
【发布时间】:2017-08-05 00:24:08
【问题描述】:

处理从我的应用程序在 GCP 中提交作业并在我的旧打印机中打印的任务,当我尝试使用这种格式的票时,一切都很好

{
 "version":"1.0",
 "print":{}
} 

得到这样的输出

但我需要它从纸的开头开始并有一些边距,所以我发送带有边距的票

{
"version":"1.0",
"print":{
        "copies":{
                "copies":1
                },
        "page_orientation":{
            "type":0
            },
        "margins": {
            "top_microns":0,
            "bottom_microns":0,
            "left_microns":0,
            "right_microns":0
            }
} 

有了这张票,我得到了一个这样的打印,开头是切边,所以我尝试给 left_microns 值(1,5,50,1000,10000, .5 , .9) 但没有任何效果。

另外,我尝试了 fit_to_page 选项仍然没有效果,任何想法如何设置自定义边距?谢谢

链接引用-> https://developers.google.com/cloud-print/docs/cdd#cjt

【问题讨论】:

  • 你找到解决边距的方法了吗?

标签: android printing thermal-printer google-cloud-print gcp


【解决方案1】:

当您调整边距时,具有大宽度的文档会缩放,我用大宽度的图像进行了测试,每当我调整边距时它会缩放以适应纸张的宽度。

因此,您可能需要增加文档(图像、pdf)的宽度以适应纸张的宽度。 这对我有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-13
    • 2012-10-20
    • 1970-01-01
    • 1970-01-01
    • 2013-09-02
    • 1970-01-01
    • 2016-12-03
    • 1970-01-01
    相关资源
    最近更新 更多