马工:
您好。
下图的打印和预览如何整个页的内容(让线框和字)整体向左靠边。
我的代码: //打印设置
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.PrintMargin printmar = new FarPoint.Win.Spread.PrintMargin();
printmar.Left = Convert.ToInt32(0);
printmar.Right = Convert.ToInt32(0 * 0.393701);
printmar.Top = Convert.ToInt32(0 * 0.393701);
printmar.Bottom = Convert.ToInt32(0 * 0.393701);
printmar.Footer = 0;
printmar.Header = 0;
//printset.PaperSize = new System.Drawing.Printing.PaperSize("A4",210,297);
printset.Margin = printmar;
printset.Centering = FarPoint.Win.Spread.Centering.Both; //打印居中
printset.ShowGrid = false; //隐藏网格线
//printset.ZoomFactor = 0.85F; //打印缩放参数
printset.ShowBorder = false; //隐藏外框线
printset.ZoomFactor = 0.92F; //打印缩放参数
printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide; //隐藏行头
printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide; //隐藏列头
printset.Margin = printmar; //加载边距
printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Landscape; //横向
//显示打印预览对话框
printset.Preview = true; //打印预览
fpSpread1.ActiveSheet.PrintInfo = printset; //打印预览
fpSpread1.PrintSheet(b);//打印预览
|