rdlc文件使用PrintDocument打印设置页面边距

在PrintDocument中,可以通过

PrintDocument printDoc = new PrintDocument();
var pageSize = new PaperSize() { PaperName = "custom", Height = 1169, Width = 880 };
printDoc.DefaultPageSettings.PaperSize = pageSize;

设置页面大小,但是若在代码中设置Margins是无效的。

可以在rdlc文件中选择报表属性,设置报表属性中的Margins来设置边框。

记录一下。

posted @ 2020-07-17 09:41  Stupid_Bire  阅读(666)  评论(0编辑  收藏  举报