Printing using PrintManager

Hello,

I want to print my diagram using PrintManager.I have a custom preferences window in which user can set the printing preferences.One can also specify Landscape as either Orientation/Potrait.
I am not sure how and where to set this value of Landscape in PrintManager so that the document gets printed in the landscape which i specified.
Thanks
Abdeali

Are you using WPF or Silverlight? What have you tried that didn’t work?

I am using wpf.I have not tried anything for this as i dont have any idea of giving landscale value using printmanager.

Please suggest.

Thanks,

Abdeali

OK. If I understand you correctly, you want to control all of the printing parameters so that the user does not see the standard PrintDialog, right?

If that is correct, then your command for printing could be implemented by something like:

private void Button_Click(object sender, RoutedEventArgs e) { // printing without showing the PrintDialog System.Windows.Controls.PrintDialog dlg = new System.Windows.Controls.PrintDialog(); dlg.PrintTicket.PageOrientation = System.Printing.PageOrientation.Landscape; // . . . maybe set other PrintTicket properties . . . myDiagram.PrintManager.Print(dlg); }