user311166
user311166

Reputation: 43

.net printdialog

i am building a button that allows a user to browse to a file. i want to get the location of the file and send it to printdialog. can this be done and if so how?

i know how to create the browse funcitonality and how to get the location...

my question is how to send the location of the file to the printdialog for printing...without opening the file

my goal is to print to pdf...

so if i can convert the .doc to pdf without printdialog that would be the best a user will browse to a file and convert it to pdf to a static destination

Upvotes: 1

Views: 408

Answers (1)

Nate Zaugg
Nate Zaugg

Reputation: 4218

The good news is that you don't have to open the file. The bad news is that if you're wanting to convert .doc files to PDF then you'll either need a component to do the work for you or you will need to do COM automation with Microsoft Word (with the Save as PDF Plug-in)

DOC to PDF library (not necessarily free)

It could also be possible to use a web browser in your application and tell it to print to a default printer (PDF printer -- lots of free ones) but if you're going to do a lot of these then finding a component to do this directly is your best bet; although quality may or may not be what you're looking for in the resulting PDF document.

Upvotes: 1

Related Questions