打印时,自定义纸张
using System.Drawing.Printing;
在Window 98下使用
PrintDocument Document = new PrintDocument();
Document.DefaultPageSettings.PaperSize = new PaperSize("A5", 827, 583);
在Win2000,XP以上的版本中使用
private readonly PrintDocument _pdc = new PrintDocument();
//A5 830*580(in英寸), A4 1170*830(in英寸)
//830,580是更改的重点,"A5"可改,可不改
PaperSize ps = new PaperSize("A5", 830, 580);
_pdc.DefaultPageSettings.PaperSize = ps;
printPreviewControl1.Document = _pdc;
//A5 830*580(in英寸), A4 1170*830(in英寸)
//830,580是更改的重点,"A5"可改,可不改
PaperSize ps = new PaperSize("A5", 830, 580);
_pdc.DefaultPageSettings.PaperSize = ps;
printPreviewControl1.Document = _pdc;