I am building a C# application that uses a DLL for print. The print function receives a printer device context (or 0 for default). If the Microsoft XPS Document Writer is the default printer, running the print function with 0, results in a pop-up that ask the user to enter a path and filename.
I wish to give the filename myself (no popup).
I've surfed the net and came up with some information regarding printing XPS without user intervention (fyuan blog posts) but most of it revolved around adding a new printer or using WPF.
I am looking for info on how to create a DC that works with the "Microsoft XPS Document Writer" but also to have a DOCINFO (lpszOutput) with the filename already given.
Any help would be appreciated.