Page 1 of 1

Printing to selected printer

Posted: Fri Jun 30, 2006 8:43 am
by 9639160
Hi,
How do I print the chart to another printer than the currently selected (default) printer?
I would like to select the printer and the page size (A4 or A3).

I'm working with Visual Studio 2005 an C#

Thanks for any help!
Pat

Posted: Fri Jun 30, 2006 3:43 pm
by narcis
Hi Pat,

Yes, you can do that doing something like this:

Code: Select all

      tChart1.Printer.PrintDocument.PrinterSettings.PrinterName = "Printer Name";
      tChart1.Printer.PrintDocument.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize(PaperName, PaperWidth, PaperHeight);

Posted: Fri Jun 30, 2006 9:38 pm
by 9639160
Hi Narcis,
Thank You very much, this is what I was looking for.
Pat