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

PrintTicket provider failed to convert PrintTicket to DEVMODE. Win32 error: -2147467259 - Any idea why?

$
0
0

 

Can someone please let me know what's wrong with the code below.  I am always getting this error:

"PrintTicket provider failed to convert PrintTicket to DEVMODE. Win32 error: -2147467259" in the lines highlighted in green.

 

if (result.ConflictStatus == ConflictStatus.ConflictResolved)
{
     newPT = result.ValidatedPrintTicket;

     pq.Commit();  It will create an exception right here.

     VisualHost vhost = new VisualHost(originX, originY, extentWidth, extentHeight, newPT);

     XpsDocumentWriter xpsdw = PrintQueue.CreateXpsDocumentWriter(pq);                                
     xpsdw.Write(vhost, newPT );  And another exception right here.

}


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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