Link to home
Start Free TrialLog in
Avatar of cbrune
cbrune

asked on

I need to bring up a printdialog and have it default to Landscape Orientation and point a file to print to it. How do I do it in c#?

I need to bring up a printdialog and have it default to Landscape Orientation and point a file to print to it.   How do I do it in c#?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And don't forget  ; )
this.printDialog1.ShowDialog();

Open in new window

Avatar of cbrune
cbrune

ASKER

how do i print the contents of the file???
What is it you're trying to print?  If it's a PDF, or text file it's usually much easier to use System.Diagnostics.Process to start Adobe Reader or Notepad and give command line switches to print - though you'll lose some control over the print dialog (actually, printing plain text isn't terribly difficult, but just about anything else will be a bit of a pain in the butt).