In his blog entry Printing documents to Microsoft XPS Document Writer without user interaction Feng Yuan says
If you're printing from your own applications, it's easy to specify MXDW as the printer driver and provide a file name for the XPS document to be saved to
Can anyone explain how to do that and provide a code sample?
The main problem i am having is suppressing the Save As dialog that the Microsoft XPS Document Writer pops up. I am loathed to resort to UI hacking as Yuan does in his post.
Currently my application makes GDI drawing calls on the Device Context of what ever printer the user wants to use. I can make those calls on the XPS Document Writer fine, but when it come times to complete the printing the XPS Writer pops up the save as dialog box.