I have a Docx Word Document and I am trying to convert it to PDF using a virtual PDF printer such as PDFCreator or similars. I want to do the same as when you open a document in Word and then you print it using an available virtual PDF printer installed on the system but in my case I am interested in doing it from C# programatically and silently (without showing user any popup window).
I am not interested in using Word Interop (Office Automation).
Could anyone provide me some example?
You can check out the leadtools Virtual Printer c# sdk.
This will allow you to create a custom virtual printer and give events that you control to do a variety of different things, including saving it out to a PDF silently.
There is a tutorial here that you can follow to test it out with a free eval: Print to File Using the Virtual Printer Driver - Console C#
The relevant pieces of the is highlighted below:
Please note that I am an employee of this company