Search code examples
c#winformsprintingxps

Print XPS document without open the dialog box in C#


How to print a XPS document,which is in my application start up path without opening the OpenFileDialog?


Solution

  • You should look into PrintQueue.AddJob. That particular method can be used to print an xps document without any additional UI interactions.