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

在PrintDocument中,可以通过

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

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

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

记录一下。

原文地址:https://www.cnblogs.com/FlyStupidBird/p/13328068.html