//初始化页面
PaperSize p = null;
//初始化设置
PageSettings ps = new PageSettings();
//默认纸张 纸张 宽 高
p = new PaperSize("金盾打印", (int)(241 / 25.4 * 100), (int)(139.7 / 25.4 * 100));
//默认边距
Margins ma = new Margins((int)(30 / 25.4 * 100), (int)(10 / 25.4 * 100), (int)(5 / 25.4 * 100), (int)(0 / 25.4 * 100));
PrinterSettings pt = new PrinterSettings();
//如果系统打印机有纸张,按系统打印配置
PrintDocument pd = new PrintDocument();
foreach (PaperSize py in pd.PrinterSettings.PaperSizes)
{
if (py.PaperName.Contains("二等分"))
p = py;
}
//设置
ps.Margins = ma;
ps.PaperSize = p;
reportViewer1.SetPageSettings(ps);
//设置打印布局模式,显示物理页面大小
this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
//缩放模式为百分比,以100%方式显示
this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
this.reportViewer1.ZoomPercent = 100;
this.reportViewer1.RefreshReport();
网上相关资料很少,记录一下! 以上配置测试可行