Hi all,
I have the following questions about printing in C# application.
1. How to print document in C# application? I have used the PrintDocument class and set the DocumentName property, e.g. @"C:\Test.doc" and use the Print Method. However, only an empty page is printed. So how can I print a document(may be a MS word document, Excel Document, PDF file) through C# written application?
2. How to convert to a file to raw print file (e.g. prn file - the format generated when you choose "print to file" in the print dialog) using C#?
3. How to convert a document to pdf format?
4. In the print dialog, when I choose to print to file, a dialog is pop up to enter the output file path. How can I automatically fill in the file path in codings and avoid pop up the dialog?
Any idea to work around is greatly appreciated. Thanks a lot.