如何在打印机设置中设置纸张厚度 [英] How to set paper thickness in printersettings

查看:2100
本文介绍了如何在打印机设置中设置纸张厚度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我试图通过System.Drawing.Printing.PrinterSettings和System.Drawing.Printing.PageSettings打印pdf。我无法通过这些类别设置纸张厚度。我怎样才能设置paperthickness? - 也许有另一种方式!?



提前感谢,



sebi

hi everyone

i was trying to print a pdf via the System.Drawing.Printing.PrinterSettings and System.Drawing.Printing.PageSettings. i wasn't able to set the paper thickness via these classes. how can i set the paperthickness? - maybe there's another way!?

thanks in advance,

sebi

推荐答案

试试这个





PrintDocument pd = new PrintDocument();



pd.DefaultPageSettings.PaperSize = pd.PrinterSettings.PaperSizes(200,200);
try this


PrintDocument pd = new PrintDocument();

pd.DefaultPageSettings.PaperSize = pd.PrinterSettings.PaperSizes(200,200);


您没有设置thinckness,您通过以下方式设置PaperType PageMediaType属性 [ ^ ]

可用的类型有: https://msdn.microsoft.com/en-us/library/system.printing.pagemediatype(v = vs.110).aspx [ ^ ]



你怎么得到的票?来自PrintDocument实例的PrintTicket属性。



这是理论,无论如何 - 我还没试过!
You don't set a thinckness, you set a PaperType via the PageMediaType property[^]
The available types are: https://msdn.microsoft.com/en-us/library/system.printing.pagemediatype(v=vs.110).aspx[^]

How do you get the Ticket? From the PrintTicket property of the PrintDocument instance.

That's the theory, anyway - I haven't tried it!


这篇关于如何在打印机设置中设置纸张厚度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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