Code: Select all
RectangleF rectfTemp = graphData.Printer.PrintDocument.DefaultPageSettings.PrintableArea;
graphData.Printer.BeginPrint();
graphData.Printer.Print(new Rectangle((int)rectfTemp.X, (int)rectfTemp.Y, (int)rectfTemp.Height, (int)rectfTemp.Width - 100));
graphData.Printer.Preview();
Now the print previewer shows the correct paper size, but the graph is the wrong size (in the control). For example, if I chose a larger paper size (8.5"x14" when before I had 8.5"X11") the graph will not fill the printable area of the page.
The graph will still print correctly though.
I need to use the Printer.Print(rectangle r) overload so I can include some images in the ChartPrint event.
I'm using C# .NET 2005 and TeeChart Pro Version 2.0.2306.26232.