打印机驱动程序-自定义纸张尺寸 [英] Printer Driver - custom paper size

查看:854
本文介绍了打印机驱动程序-自定义纸张尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用自定义打印机V3驱动程序。
当前的任务是使用户能够创建自定义纸张尺寸。我用谷歌搜索了一下,发现了两种方法:

I'm working on custom printer V3 driver. The current task is to give ability to create custom paper size to user. I google it a bit and found 2 ways of doing that:

1)GPD文件中的CUSTOMSIZE选项。
我已将其添加到我的GPD文件中:

1) CUSTOMSIZE option in GPD file. I've added this to my GPD file:

  *Option: CUSTOMSIZE
{
    *rcNameID: =USER_DEFINED_SIZE_DISPLAY
    *MinSize: PAIR(4724, 6992)      
    *MaxSize: PAIR(14032, 20410)    
    *MaxPrintableWidth: 14032
    *MinLeftMargin: 0
    *CenterPrintable?: FALSE
    *Command: CmdSelect
    {
        *Order: PAGE_SETUP.2
        *Cmd: ""
    }
}

,但找不到它在用户界面中的显示位置。

, but could not find where it appears in UI.

2)我还发现某些打印机具有自定义对话框,允许创建自定义纸张尺寸。
例如:

2) also I found that some printers have custom dialogs which allow to create custom paper size. For example:

是可以为V3打印机驱动程序创建?如果是,那怎么办?

Is it possible to create for V3 printer driver? If yes then how?

谢谢!

推荐答案

是。两种方式都可以。要在V4和V3打印机驱动程序模型中使用自定义(供应商定义或用户定义)的纸张尺寸(非标准纸张尺寸),可以通过以下链接,但需要开发一些代码:

Yes. Both ways work. To use customized (vendor-defined or user-defined) paper sizes (non-standard paper sizes) in V4 and V3 printer driver models, you can go through the following links but you need to develop some codes:

https:/ /docs.microsoft.com/zh-CN/windows-hardware/drivers/print/unidrv-minidrivers

https://docs.microsoft.com/zh-CN/windows-hardware/drivers/print / printer-features

https://docs.microsoft.com/zh-CN/windows-hardware/drivers/print/customized-features

https://docs.microsoft.com/zh-CN/windows-hardware/drivers/print/customized-options

https://docs.microsoft.com/zh-CN / windows-hardware / drivers / print / specifying-paper-sizes

https://docs.microsoft.com/zh-cn/windows-hardware/drivers/print/supporting -vendor-defined-paper-sizes

https://docs.microsoft.com/zh-cn/windows-hardware/drivers/print/supporting-user-defined-paper -sizes

在V4打印驱动程序模型中,更改.gpd文件会破坏驱动程序包的标志,您将很难安装已更改的驱动程序Windows驱动程序存储库中的软件包。如果您不开发自己的驱动程序,则必须重新签名该驱动程序包,它看起来并不像听起来那样简单。

In V4 print driver model, changing .gpd file breaks the driver package sign and you will have difficulty to install your changed driver package in Windows Driver Repository. You have to re-sign the driver package that it does not look as simple as it sounds if you are not developing your own driver.

实际上提供了第二种方法由驱动程序供应商或开发人员使用第一个。它们在驱动程序的.gpd文件中包含一些基于GDL模式的描述,以允许最终用户定义自己的自定义纸张尺寸。有关简单明了的示例,请参见上面的最后一个链接。

The second way is in fact provided by the driver vendor or developer using the first one. They include some GDL schema-based description in the .gpd file(s) of their driver to allow the end users to define their own custom paper size(s). For a clear and straight forward sample, see the last link above.

这篇关于打印机驱动程序-自定义纸张尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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