_chart.Printer.PrintDocument related problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
DA
Newbie
Newbie
Posts: 2
Joined: Thu Apr 29, 2004 4:00 am

_chart.Printer.PrintDocument related problem

Post by DA » Tue May 25, 2004 8:00 am

Hi!
I want to get chart as PrintDocument. I've read FAQ on this issue but the example provided doesn't meet my needs.
private void button1_Click(object sender, System.EventArgs e) {
tChart1.Printer.BeginPrint();
tChart1.Printer.Print(new Rectangle(100,10,300,200));
PrintDocument pDoc = tChart1.Printer.PrintDocument;
pDoc.Print();
}
The scenario is following. I use Chart.Printer.Print() for printing and Chart.Printer.PrintDocument to pass to my own PrintPreview window. This window is necessary because I need the same PrintPreview for all my system so Steema Chart's PrintPreview functionality can't be used.

The problem is how to get THE SAME results using two methods:

1.
Chart.Printer.Print()

2.
tChart1.Printer.BeginPrint();
tChart1.Printer.Print(new Rectangle(100,10,300,200));
PrintDocument pDoc = tChart1.Printer.PrintDocument;

I'd like the results to be as of method 1. Of course it's easy to get both results as of method 2 but then it's necessary to resize chart because I'd like it always to go in the printed page. So it's not so easy again. May be somebody knows how?

Thanks for help.

Post Reply