在C#Windows应用程序中从WebBrowser控件打印时设置纸张尺寸 [英] set paper size while printing from WebBrowser contrl in C# windows application

查看:232
本文介绍了在C#Windows应用程序中从WebBrowser控件打印时设置纸张尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从c#应用程序中的Web浏览器控件中打印页面,默认情况下它采用A4尺寸,所以我得到的打印量很小. 我想在打印预览设置中获得类似收缩以适合"属性的打印.页面属性:

PrintDialog pd = new PrintDialog();
如果(pd.ShowDialog()== DialogResult.OK){
printDocument1.PrinterSettings = pd.PrinterSettings;
//东西
}


Hi i am trying to print page from web browser control in c# application, by default it is taking A4 size so i am getting very small print.
I would like to get print like "Shrink To Fit" property in print preview settings.

解决方案

You can use the Print dialog to allow the user to set any printing or page properties:

PrintDialog pd = new PrintDialog();
if (pd.ShowDialog() == DialogResult.OK){
printDocument1.PrinterSettings = pd.PrinterSettings;
//Something
}


这篇关于在C#Windows应用程序中从WebBrowser控件打印时设置纸张尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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