Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Exceptions when Printing with WPF (GDIExporter)

$
0
0

The same (?) problem was also reported in much greater detail two years ago here: http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/ec26f3a1-5ceb-4f0e-8ba3-74a5ade98a9a/#fbae1d9f-2dcf-4d45-98a7-c7aa8f016271

We are developing a mind mapping application (www.novamind.com) using C# and WPF (.NET Framework 4.0) 

Some of our customers seem unable to print from our application. Based on the exceptions this seems to be a problem with the framework. I don't know how to get around or solve this problem and would appreciate any input.

These two exceptions seem to be the most common errors:

 

--

Exception : System.Printing.PrintSystemException

Message   : Printing was canceled. Win32 error: The parameter is incorrect.

 

Source    : System.Printing

Help      : 

Stack     :

   at Microsoft.Internal.GDIExporter.CGDIRenderTarget.StartDocument(String printerName, String jobName, String filename, Byte[] devmode)

   at Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName, PrintTicket ticket)

   at System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o, Boolean documentPrintTicketRequired)

   at System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject)

   at System.Windows.Xps.VisualsToXpsDocument.WriteVisual(Boolean asyncMode, PrintTicket printTicket, PrintTicketLevel printTicketLevel, Visual visual)

   at System.Windows.Xps.VisualsToXpsDocument.Write(Visual visual)

 

===

Exception : System.Printing.PrintSystemException 

Message : Printing was canceled. Win32 error: The data area passed to a system call is too small. 

 

Source : System.Printing 

Help : 

Stack : 

at Microsoft.Internal.GDIExporter.CGDIRenderTarget.StartDocument(String printerName, String jobName, String filename, Byte[] devmode) 

at Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocument(String jobName, PrintTicket ticket) 

at System.Windows.Xps.Serialization.NgcSerializationManager.StartDocument(Object o, Boolean documentPrintTicketRequired) 

at System.Windows.Xps.Serialization.NgcSerializationManager.SaveAsXaml(Object serializedObject) 

at System.Windows.Xps.VisualsToXpsDocument.WriteVisual(Boolean asyncMode, PrintTicket printTicket, PrintTicketLevel printTicketLevel, Visual visual) 

at System.Windows.Xps.VisualsToXpsDocument.Write(Visual visual) 

--

 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>