我们如何在printdocument中设置纸张尺寸? [英] how we set paper size in printdocument?

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

问题描述



我们如何在printdocument中设置纸张尺寸?我想以小尺寸打印我的网页,如(200 X 200)。请回复


how we set paper size in printdocument? I want to print my webpage in small size like (200 X 200).Please Reply

推荐答案



Hi,
PrintDocument pd = new PrintDocument();

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





希望这会有所帮助...



享受编码...



Hope this helps...

Enjoy Coding...


去这个链接获取你的信息。



http://social.msdn.microsoft.com/Forums/sa/vbpowerpacks/thread/6abb54d7-167a-406e-bce5 -8b3d00cebd9c [ ^ ]
go this link for ur information.

http://social.msdn.microsoft.com/Forums/sa/vbpowerpacks/thread/6abb54d7-167a-406e-bce5-8b3d00cebd9c[^]


printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize(custom,200,200);

printPreviewDialog1.Document = printDocument1;

printPreviewDialog1.ShowDialog();
printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("custom", 200, 200);
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();


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

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