Board index » Visual Studio » Slow printing
|
thepringle
|
Slow printing
Visual Studio157
Anyone have any tips to speed up the print process in VB .NET. I am trying to print an accounting batch journal, which are sometimes 5+ pages long, and they are taking between 8-10 seconds for the print sub of the print document to complete (VB6 version took +-1 second). Inside the PrintPage event, I am pulling items from an array, assigning to a string, and using graphics.drawstring to format the report: strFormat.Alignment = StringAlignment.Near str2Prt = aryPrt(PrintLine).F1 sngCurY = intTopMargin + (intLineCount * fntRegular.GetHeight(grPage)) sngLenTxt = grPage.MeasureString(str2Prt, fntRegular).Width rectF = New RectangleF(sngDataCol1, sngCurY, sngLenTxt, fntRegular.GetHeight(grPage)) grPage.DrawString(str2Prt, fntRegular, Brushes.Black, rectF, strFormat) Is there a better way to do this or is there a consensus that slow printing is the norm in .NET? Any help or comments would be appreciated. Thanks. -Chris - |
