Environment: Visual Studio 2005, .NET Framework 2.0, Windows XP SP3, WindowsForms Application
If I want to print a Worksheet, I have to wait nearly 2 minutes for output.
The Worksheet has only two pages with 4 polar charts an 4 line charts.
Open it in Excel 2003 and printing takes few seconds. What could this be??
Here is the code snippet: (curve.C, curve.R, curve.Z are array of double)
Workbook wb = new Workbook(@"C:\NETProjects\2009_004_KGT_Uni\Mappe2.xls", new LoadOptions(LoadFormat.Excel97To2003));
Worksheet sheet0 = wb.Worksheets[0];
sheet0.Cells.ImportArray(curve.C, 2, 0, true);
sheet0.Cells.ImportArray(curve.R, 2, 1, true);
sheet0.Cells.ImportArray(curve.Z, 2, 2, true);
wb.CalculateFormula(true);
Worksheet sheet1 = wb.Worksheets[1];
PageSetup pgs = sheet1.PageSetup;
pgs.Zoom = 100;
pgs.Order = PrintOrderType.OverThenDown;
pgs.Orientation = PageOrientationType.Landscape;
pgs.PaperSize = PaperSizeType.PaperA4;
pgs.LeftMargin = 1.5;
pgs.RightMargin = 1.5;
pgs.BottomMargin = 1.0;
pgs.TopMargin = 1.0;
pgs.FooterMargin = 0.0;
pgs.HeaderMargin = 0.0;
//Apply different Image / Print options.
Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();
options.PrintingPage = PrintingPageType.IgnoreBlank;
SheetRender sr = new SheetRender(sheet1, options);
//Print the sheet.
//sr.ToPrinter("Microsoft XPS Document Writer");
sr.ToPrinter("Amyuni PDF Converter");