views:

44

answers:

1
+1  Q: 

.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

+1  A: 

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)

http://stackoverflow.com/questions/1595742/doc-to-pdf-library-not-necessarily-free/1595855

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.

Nate Zaugg