DEVMODE结构中的dmPaperLength和dmPaperWidth限制 [英] dmPaperLength and dmPaperWidth limitation in DEVMODE structure

查看:361
本文介绍了DEVMODE结构中的dmPaperLength和dmPaperWidth限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Windows编写一个postscript驱动程序。它必须支持较大的纸张宽度和纸张高度。问题是如果我打印到宽度或高度大于129英寸的自定义大小的纸张(在服务器属性中创建 - 表单并在驱动程序
UI中选择) 纸张尺寸设置回字母大小。我相信这是因为DEVMODE结构的dmPaperWidth和dmPaperLength成员只是一个短的事实所强加的Windows打印SDK限制,这意味着Windows支持的最大纸张
大小是32767(十分之一)毫米),129英寸。即使在没有任何插件的核心postscript驱动程序中也存在此问题。将非常感谢此问题的任何解决方案或解决方法。

I am writing a postscript driver for Windows. It must support large paper width and paper height. The problem is that if I print to a custom sized paper of width or height greater than 129 inches(created in server properties - forms and selected in driver UI)  the paper size gets set back to letter size. I believe this is because of a windows print SDK limitiation imposed by the fact that the dmPaperWidth and dmPaperLength member of the DEVMODE structure is only a short, which means that the maximum paper size supported by Windows is 32767 (in tenths of a millimeter), which is 129 inches. This problem is present even in the core postscript driver without any plugins. Any solution or workaround for this problem will be greatly appreciated.

推荐答案

我的理解是这个限制是系统中固有的,并且是由DEVMODE中的dmPaperLength和dmPaperWidth参数定义为短路并定义1/10 mm。
最大尺寸为3276.7毫米或129英寸。

PrintTicket技术是当前DEVMODE结构的继承者。它是一种基于可扩展标记语言的文档,用于指定和保留有关作业格式化
和打印作业配置的信息。有关PrintTicket架构和文档构建的更多信息,请查看以下链接:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms715314%28v=vs.85%29.aspx

不幸的是使用旧GDI API并且不打印的应用程序在实际打印作业时,使用纯PrintTicket仍然受到DEVMODE结构的限制。

至于驱动程序,我能想到的唯一的问题是,如果有人制作了一个特殊的打印机驱动程序,例如,它将纸张尺寸定义为实际尺寸的一半,但将其分辨率定义为
,其实际分辨率是其两倍,以便打印所有内容双倍大小。我不确定这会是多么痛苦,或者你的设备是否可能。但无论如何,这当然不是一项微不足道的任务。


这篇关于DEVMODE结构中的dmPaperLength和dmPaperWidth限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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