5
votes

This question

How to programmatically print to PDF file without prompting for filename in C# using the Microsoft Print To PDF printer that comes with Windows 10

contains a good answer on how to achieve this in a Windows Forms application.

Unfortunately I use WPF and have not been able to find a working solution. WPF contains the classes PrintTicket and PrintQueue to control the output, but neither of them contain a PrintToFile (or similar) property.

1

1 Answers

-1
votes

With a WPF project, System.Drawing.Printing is where PrintDocument resides.