How to Scale chart into a rectangle to fit the printer page.
How to Scale chart into a rectangle to fit the printer page.
Can you show me how to print a chart from a window of user defined size to fit the page of the printer. We need to make the chart.Print(Rectangle) to use System.Drawing.Printing.PageSettings bounds rectangle to print from the chart, as we have our own printer preview screens and custom information etc need to be added before printing.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Need a more generic solution
The example posted in the link does not solve our problem. Print preview is only a constraint in our environment, in fact we use the TChart1.Print(Rectangle) as shown in the link. The problem is scaling for example 1) a maximized window containing the chart prints well on my machine, but a resized window containing the chart only prints partial chart. 2) Different screen resolutions produce different print outputs. I do not clearly understand the conversion factors from view to print.
The solution I am expecting is a generic nature of printing. A Chart print from a view should always fit the printer page on all circumstances.
The solution I am expecting is a generic nature of printing. A Chart print from a view should always fit the printer page on all circumstances.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi HughM,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Issue resolved.
Created an example project to reproduce the problem and found that tchart is printing exactly the way I asked for " A Chart print from a view should always fit the printer page on all circumstances" for resized window and with different screen resolutions.
Thanks for your help anyways.
Thanks for your help anyways.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi HughM,
Don't mention it! I'm glad to hear you could solve the problem.
Don't mention it! I'm glad to hear you could solve the problem.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |