Am trying to print visual on Microsoft XPS Document Writer using VisualsToXpsDocument.Write(). I am encountering following error on clicking the close (x button on top right) button of the "Save the file as" dialog box -
Printing was canceled. Win32 error: The data area passed to a system call is too small.
The StackTrace for the same is -
at Microsoft.Internal.GDIExporter.CGDIRenderTarget.ThrowOnFailure(Int32 hr)
at Microsoft.Internal.GDIExporter.CGDIRenderTarget.StartDocumentWithoutCreatingDC(String priterName, String jobName, String filename)
at Microsoft.Internal.AlphaFlattener.MetroToGdiConverter.StartDocumentWithoutCreatingDC(String jobName)
at System.Windows.Xps.Serialization.MXDWSerializationManager.EnablePassThru()
at System.Windows.Xps.VisualsToXpsDocument.WriteVisual(Boolean asyncMode, PrintTicket printTicket, PrintTicketLevel printTicketLevel, Visual visual)
at System.Windows.Xps.VisualsToXpsDocument.Write(Visual visual, PrintTicket printTicket)
at LC.Classes.EventPrinting.PrintView(List`1 Visuals, String View)
Whats going wrong ?
Thanks!
Discussions
-
-
What kind of application, you are working on - Windows or Web ? Buffering can help you put, if its web application.
-
Want to include AOL mailing functionality to my WPF windows application, where a user can read/send mails using his/her AOL account. Don't know where to start and what to look for ?

-
Is there any way to detect whether a wpf control received mouse double click (couldn't find the MouseDoubleClick event)? Actually I am starting a storyboard animation on click of a button (in xaml) and getting wiered behaviour if user performs double click. As far as click (single) is concerned the application is working perfectly fine.
-
I want to restrict my application from getting refreshed on pressing F5 in mediacenter but don't have any clues regarding this
. Need suggestions. -
Thanks a lot for this well explained demo !! Its working for me now

-
Yes ofcourse, the file does exists at the location and if I provide same URI to MEdiaElement it does play the video.

-
I've been trying to play video in my wpf windows application, tried video play using MediaElement just to receive wired behavior (mentioned in the other thread). Now I am trying to use MediaPlayer using the following code -
MediaPlayer player = new MediaPlayer();
player.Open(new Uri(@"sampleMedia\xbox.wmv", UriKind.Relative));
VideoDrawing aVideoDrawing = new VideoDrawing();
aVideoDrawing.Rect = new Rect(0, 0, 100, 100);
aVideoDrawing.Player = player;
player.Play();
Th problem is that, I am not able to see any video. Am I doing anything wrong ?
-
Can MediaPlayer be helpful in such a scenario ?
