回复 1楼hptj的帖子
需要设置PrintInfo缩放属性:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.Sheets[0].OpenExcel("原始文件.xls", 1);
- PrintInfo pt = new PrintInfo();
- pt.Orientation = PrintOrientation.Landscape;
- pt.PrintToPdf = true;
- pt.PdfFileName = "test.pdf";
- pt.ZoomFactor = 0.75f;
- pt.ShowColor = true;
- pt.UseSmartPrint = true;
- this.fpSpread1.Sheets[0].PrintInfo = pt;
- this.fpSpread1.AllowCellOverflow = true;
- this.fpSpread1.PrintSheet(0);
- }
复制代码 |