如何找到打印机分辨率 [英] How to find printer Resolution

查看:590
本文介绍了如何找到打印机分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我需要找到PrinterResolution.种类的文档已发送到打印机.
实际上,我的目的是允许管理员捕获所有正在以高分辨率打印的打印.

我搜索了一下,发现System.Drawing.Printing.PrinterSettings.PrinterResolution将对我有帮助.

但是,如何找到假脱机文档的PrintResolution?

Prathamesh

Hello,
I need to find PrinterResolution.Kind of a document whis is been sent to printer.
Actually my aim is to Allow admin to catch all the Print which are being printer in High Resolution.

I googled and found System.Drawing.Printing.PrinterSettings.PrinterResolution will help me.

But how can i Find the PrintResolution of Spooled Document?

Prathamesh

推荐答案

在大多数情况下,您真正​​需要了解的不是打印机分辨率(从打印代码的角度来看并不会真正影响打印;是吗?有两个打印页面,这些打印页面的像素大小相同但分辨率不同,要发送的打印数据完全相同.

如果使用的是System.Drawing.Printing,则最终将使用类System.Drawing.Printing.PrintDocument.如果使用此类进行打印:-),则必须处理事件System.Drawing.Printing.PrintDocument.PrintPage,并且该事件的事件参数将在其属性MarginBoundsPageBoundsPageSettings中传递所需的信息.给您处理程序.

请参阅:
http://msdn.microsoft.com/en-us/library/system. drawing.printing.printdocument.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. drawing.printing.printpageeventargs.aspx [ ^ ].

—SA
What you really need to know in most cases is not a printer resolution (is does not really effect the printing from the standpoint of your printing code; is you have two print pages with the same sizes in pixels but different resolutions, the print data to be send is exactly the same).

If you are using System.Drawing.Printing you will ultimately use the class System.Drawing.Printing.PrintDocument. If you use this class for printing :-), you will have to handle the event System.Drawing.Printing.PrintDocument.PrintPage, and event arguments of this event will pass the required information in its properties MarginBounds, PageBounds, as well as PageSettings to you handler.

Please see:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs.aspx[^].

—SA


这篇关于如何找到打印机分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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