Hallo Kollegen,
ich schreibe an einer Anwendung, die auch ausdrucken können soll. Unter WinXP funktioniert alles klaglos, jedoch auf Win98 (mit Framework 1.1 und SP1; Drucker (funktioniert bei anderen Anwendungen):HP Laserjet 6) löst der Aufruf von PrintDokument.Print() bzw. eines PrintPreviewDialog.ShowDialog() folgende Exception aus:
************** Exception Text **************
System.ArithmeticException: Overflow or underflow in the arithmetic operation.
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
at System.Drawing.Font..ctor(String familyName, Single emSize)
at WindowsApplication1.Form1.printDocument1_PrintPage (Object sender, PrintPageEventArgs e) in c:\vc# work\test\drucken\drucken\windowsapplication1\form 1.cs:line 198
at System.Drawing.Printing.PrintDocument.OnPrintPage( PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage (PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop( PrintDocument document)
at System.Drawing.Printing.PrintController.Print(Prin tDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at WindowsApplication1.Form1.button5_Click(Object sender, EventArgs e) in c:\vc# work\test\drucken\drucken\windowsapplication1\form 1.cs:line 315
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Exception Text **************
System.ArithmeticException: Overflow or underflow in the arithmetic operation.
at System.Windows.Forms.PrintPreviewControl.Calculate PageInfo()
at System.Windows.Forms.Control.InvokeMarshaledCallba cks()
Habe schon im Netz nachgeschaut, doch die bisher gefundenen Lösungsvorschläge (neueste Version Framework, StandardPrintController) führten nicht zum Ziel.
Meine Nachforschungen bis jetzt haben ergeben, das die Exception nicht bei jedem Druckertreiber auftritt (Treiber von Win98 = OK, neuester Treiber von HP = Absturz).
Hat von euch jemand eine Idee wie man diese Problem beseitigen kann? Bin für jeden Vorschlag dankbar.
lg
Wolfgang
ich schreibe an einer Anwendung, die auch ausdrucken können soll. Unter WinXP funktioniert alles klaglos, jedoch auf Win98 (mit Framework 1.1 und SP1; Drucker (funktioniert bei anderen Anwendungen):HP Laserjet 6) löst der Aufruf von PrintDokument.Print() bzw. eines PrintPreviewDialog.ShowDialog() folgende Exception aus:
************** Exception Text **************
System.ArithmeticException: Overflow or underflow in the arithmetic operation.
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
at System.Drawing.Font..ctor(String familyName, Single emSize)
at WindowsApplication1.Form1.printDocument1_PrintPage (Object sender, PrintPageEventArgs e) in c:\vc# work\test\drucken\drucken\windowsapplication1\form 1.cs:line 198
at System.Drawing.Printing.PrintDocument.OnPrintPage( PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage (PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop( PrintDocument document)
at System.Drawing.Printing.PrintController.Print(Prin tDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at WindowsApplication1.Form1.button5_Click(Object sender, EventArgs e) in c:\vc# work\test\drucken\drucken\windowsapplication1\form 1.cs:line 315
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Exception Text **************
System.ArithmeticException: Overflow or underflow in the arithmetic operation.
at System.Windows.Forms.PrintPreviewControl.Calculate PageInfo()
at System.Windows.Forms.Control.InvokeMarshaledCallba cks()
Habe schon im Netz nachgeschaut, doch die bisher gefundenen Lösungsvorschläge (neueste Version Framework, StandardPrintController) führten nicht zum Ziel.
Meine Nachforschungen bis jetzt haben ergeben, das die Exception nicht bei jedem Druckertreiber auftritt (Treiber von Win98 = OK, neuester Treiber von HP = Absturz).
Hat von euch jemand eine Idee wie man diese Problem beseitigen kann? Bin für jeden Vorschlag dankbar.
lg
Wolfgang
Comment