L
lumazi
Hello all,
I'm having an issue printing to a network printer. The line of code
is fairly simple
printDocument1.Print();
When you select print from a local printer it works fine, when you
select a network printer you get the following error.
----------------------------------------------------------------------------------------------------
FUNC: Void Main()
----------------------------------------------------------------------------------------------------
EX.MESSAGE: The RPC server is unavailable
----------------------------------------------------------------------------------------------------
EX.SOURCE: System.Windows.Forms
----------------------------------------------------------------------------------------------------
EX.STACKTRACE: at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint(PrintDocument
document, PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument
document)
at System.Drawing.Printing.PrintDocument.Print()
at benchmark.mainForm.printMenuItem_Click(Object sender, EventArgs
e) in C:\personal\benchmark\benchmark.cs:line 2542
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at benchmark.mainForm.Main() in
C:\personal\benchmark\benchmark.cs:line 1761
----------------------------------------------------------------------------------
I'm not sure what's causing the error? Any help would be most
appreciated.
Thank you in advance
Scott Vercuski
I'm having an issue printing to a network printer. The line of code
is fairly simple
printDocument1.Print();
When you select print from a local printer it works fine, when you
select a network printer you get the following error.
----------------------------------------------------------------------------------------------------
FUNC: Void Main()
----------------------------------------------------------------------------------------------------
EX.MESSAGE: The RPC server is unavailable
----------------------------------------------------------------------------------------------------
EX.SOURCE: System.Windows.Forms
----------------------------------------------------------------------------------------------------
EX.STACKTRACE: at
System.Windows.Forms.PrintControllerWithStatusDialog.OnStartPrint(PrintDocument
document, PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument
document)
at System.Drawing.Printing.PrintDocument.Print()
at benchmark.mainForm.printMenuItem_Click(Object sender, EventArgs
e) in C:\personal\benchmark\benchmark.cs:line 2542
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at benchmark.mainForm.Main() in
C:\personal\benchmark\benchmark.cs:line 1761
----------------------------------------------------------------------------------
I'm not sure what's causing the error? Any help would be most
appreciated.
Thank you in advance
Scott Vercuski