Print a file of any type given file path

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

Hi,

I need to print word doc, excel, pdf, images(tiff), html.
If this is impossible?

Please suggest what i should do?
- like handle each type in code separately?

thanks
 
Anthony said:
Hi,

I need to print word doc, excel, pdf, images(tiff), html.
If this is impossible?

I'd use ShellExecute. This will dispatch the printing task to Word,
Excel, Acrobat or whatever application associated with the file type.

Process printJob = new Process();
printJob.StartInfo.FileName = "FILENAME HERE";
printJob.StartInfo.UseShellExecute = true;
printJob.StartInfo.Verb = "print";
printJob.Start();

Good luck,

Koen.
 
Any chance of being able to specify the print setting?

Also, images only support the "printto" verb and I am not sure how to
use it. Where can i find more infomation on the available parameters?

thanks

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Back
Top