0
votes

Is there a way to programmatically set some of the settings for the chart printing? I want the default print to be orientation of landscape, but the only way I can find to do that is launch the chart1.Printing.PageSetup() and have the user do it. I'd prefer to handle it all myself in code.

Below are my options. I tried playing with the PrintDocument settings, but couldn't find what I needed. Thanks in advanced.

Options

I'm using Visual Studio 2010 and .NET 4.0 and I'm using winforms.

1

1 Answers

1
votes

You can set all kinds of properties, pretty much as you tried to do. Just look a little closer into the various properties of the PrintDocument, which is a regular PrintDocument object!

The Orientation is hidden behind the Landscape property..:

 chart1.Printing.PrintDocument.DefaultPageSettings.Landscape = true;