PrintTicket provider failed to convert PrintTicket to DEVMODE

Stimulsoft Reports.NET discussion
Post Reply
DoA
Posts: 7
Joined: Tue Dec 01, 2009 6:36 am

PrintTicket provider failed to convert PrintTicket to DEVMODE

Post by DoA »

Hi

I got this exception when I try to print a report "PrintTicket provider failed to convert PrintTicket to DEVMODE"
Does anyone know what this is?

System.Printing.PrintQueueException: PrintTicket provider failed to convert PrintTicket to DEVMODE. Win32-feil: -2147418113
ved MS.Internal.Printing.Configuration.PTProvider.ConvertPrintTicketToDevMode(MemoryStream printTicket, BaseDevModeType baseType, PrintTicketScope scope)
ved System.Printing.Interop.PrintTicketConverter.InternalConvertPrintTicketToDevMode(PTProvider provider, PrintTicket printTicket, BaseDevModeType baseType, PrintTicketScope scope)
ved System.Printing.Interop.PrintTicketConverter.ConvertPrintTicketToDevMode(PrintTicket printTicket, BaseDevModeType baseType, PrintTicketScope scope)
ved System.Printing.Interop.PrintTicketConverter.ConvertPrintTicketToDevMode(PrintTicket printTicket, BaseDevModeType baseType)
ved Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.GetDevmode(PrintTicket ticket)
ved Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName, PrintTicket ticket)
ved System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o, Boolean documentPrintTicketRequired)
ved System.Windows.Xps.Serialization.NgcDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
ved System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject)
ved System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
ved System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator)
ved System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)
ved Stimulsoft.Report.Print.StiWpfPrintProvider.Print(Object printTicketObject, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int32 copies, String printerName)
ved Stimulsoft.Report.StiReport.PrintWithWpfInternal(Object printTicket, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int32 copies, String printerName)
ved Stimulsoft.Report.StiReport.PrintWithWpf(Object printTicket, Boolean showPrintDialog, Int32 fromPage, Int32 toPage, Int32 copies, String printerName)
ved Stimulsoft.Report.StiReport.PrintWithWpf()
ved Stimulsoft.Report.Viewer.StiWpfViewerControl.OnReportPrint(RoutedEventArgs e)
ved Stimulsoft.Report.Viewer.StiWpfViewerControl.InvokeReportPrint()
ved Stimulsoft.Report.Viewer.StiWpfViewerControl.OnViewerCommand(Object target, ExecutedRoutedEventArgs args)
ved System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
ved System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
ved System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
ved System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
ved System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
ved System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
ved System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
ved System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
ved System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
ved System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
ved System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
ved System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
ved System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
ved System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
ved MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
ved System.Windows.Controls.Primitives.ButtonBase.OnClick()
ved System.Windows.Controls.Button.OnClick()
ved System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
ved System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
ved System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
ved System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
ved System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
ved System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
ved System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
ved System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
ved System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
ved System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
ved System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
ved System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
ved System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
ved System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
ved System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
ved System.Windows.Input.InputManager.ProcessStagingArea()
ved System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
ved System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
ved System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
ved System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
ved System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
ved MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
ved MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
ved System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
ved System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

PrintTicket provider failed to convert PrintTicket to DEVMODE

Post by Edward »

Hi

Could you please provide us with more information on printing environment. Did it happen with some particular printer or that error occurred for several different printers?

Thank you.
DoA
Posts: 7
Joined: Tue Dec 01, 2009 6:36 am

PrintTicket provider failed to convert PrintTicket to DEVMODE

Post by DoA »

Hi

This happens on all printers on the machine.
Microsoft Windows XP Professional 5.1.2600 Service Pack 3 Build 2600

HP Color LaserJet CP3505 PCL 6
HP LaserJet 3200 Series PCL

hptcpmib 2.40.00.015
hptcpmon 2.40.00.015
hpbmmon 10.00.16
hpdomon 03.42.00
hpptui0 01.00.53
hpzipm12 12.1.1.52
hpzppc00 60.032.69.31
hppamon0 7.0.5.0


Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

PrintTicket provider failed to convert PrintTicket to DEVMODE

Post by Jan »

Hello,

Very strange error. This error is not depend on our product. As i see Something wrong with creationg Xps document (which WPF used for printing). Can you provide me additional information:

-You try to print report from Viewer control?
-Which version of Reports.Wpf you use?
-Which version of .Net you use?
-Try to print from Demo.Wpf.exe application. Error will be same?

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

PrintTicket provider failed to convert PrintTicket to DEVMODE

Post by Jan »

Hello,

As i see from web search this is problem in WPF environment when WPF print provider try to enumerate printer capabilities and solution does not exist now (or i can't find it). We continue investigate this problem. Also we will add special static option to our product:

Code: Select all

StiOptions.Wpf.UseGDIPrintingInWPFViewer = true;
This options will be force GDI printing from WPF viewer.

p.s. Changes will be available in build from 11 Jan.

Thank you.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

PrintTicket provider failed to convert PrintTicket to DEVMODE

Post by Andrew »

Hello,

These are WPF bugs not ours.

Thank you.
Post Reply