Printing issue with TeeChart Pro 2011 for Delphi XE2
Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi.
I encountered an issue whith the fonts when printing with TeeChart Pro 2011 for Delphi XE2.
With Delphi 2010 the printed export looks as expected:
With Delphi XE2 the fonts of the legend and the hints looks very strange:
I use TChart.PrintPartial() for printing.
Is this a known issue?
Is there a fix or workaround for this?
Thanks for your help!
I encountered an issue whith the fonts when printing with TeeChart Pro 2011 for Delphi XE2.
With Delphi 2010 the printed export looks as expected:
With Delphi XE2 the fonts of the legend and the hints looks very strange:
I use TChart.PrintPartial() for printing.
Is this a known issue?
Is there a fix or workaround for this?
Thanks for your help!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi marder,
This works fine for me here with Delphi XE2 using this code:
Which TeeChart version are you using? Does this occur with different printers?
Thanks in advance.
This works fine for me here with Delphi XE2 using this code:
Code: Select all
uses VCLTee.Series, VCL.Printers;
procedure TForm2.FormCreate(Sender: TObject);
begin
Chart1.AddSeries(TPieSeries.Create(Self)).FillSampleValues;
Chart1.Legend.Alignment:=laBottom
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
Printer.Orientation:=poLandscape;
Printer.BeginDoc;
Chart1.PrintPartial(Rect(0,0,Printer.PageWidth,Printer.PageHeight));
Printer.EndDoc;
end;
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 |
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi Narcis,
I tried the code you send me, but this however leads to the same result.
When I use the code in a simple sample project with chart and pie series default settings, all works as expected
Anyway, the printing works correctly with Delphi 2010.
I will try to build a sample project including my settings were this issue occurs.
Contact you soon...
I tried the code you send me, but this however leads to the same result.
When I use the code in a simple sample project with chart and pie series default settings, all works as expected
Anyway, the printing works correctly with Delphi 2010.
I will try to build a sample project including my settings were this issue occurs.
Contact you soon...
Last edited by marder on Fri Mar 23, 2012 1:53 pm, edited 1 time in total.
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
P.S.: This issue is not specific for one printer. I tried with several printers.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi marder,
Thanks for the feedback.When I use the code in a simple sample project with chart and pie series default settings, all works as expected
Yes, please, that will help.I will try to build a sample project including my settings were this issue occurs.
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 |
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi Narcis.
I found the reason that causes this issue!
I am using TGDIPlusCanvas form unit VCLTee.TeeGDIPlus as Canvas for the chart.
Please add
Note: I use TGDIPlusCanvas to prevent an issue with the Anti-Alias tools in TeeChart Pro 2011 which I reported before
(See: http://www.teechart.net/support/viewtop ... f=3&t=9180)
So what should I do now?
Do I have to decide between fancy chart in GUI or fancy chart in printed export
Thanks for your help!
I found the reason that causes this issue!
I am using TGDIPlusCanvas form unit VCLTee.TeeGDIPlus as Canvas for the chart.
Please add
to the OnCreate event of the main form to see this issue.
Chart1.Canvas := TGDIPlusCanvas.Create;
Note: I use TGDIPlusCanvas to prevent an issue with the Anti-Alias tools in TeeChart Pro 2011 which I reported before
(See: http://www.teechart.net/support/viewtop ... f=3&t=9180)
So what should I do now?
Do I have to decide between fancy chart in GUI or fancy chart in printed export
Thanks for your help!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi marder,
I don't get strange fonts as you did using the code you posted. What about antialiasing GDI+ canvas and font?
If the problem persists could you please let us know the exact TeeChart version you are using and attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
I don't get strange fonts as you did using the code you posted. What about antialiasing GDI+ canvas and font?
Code: Select all
procedure TForm2.FormCreate(Sender: TObject);
var g: TGDIPlusCanvas;
begin
Chart1.AddSeries(TPieSeries.Create(Self)).FillSampleValues;
Chart1.Legend.Alignment:=laBottom;
g:=TGDIPlusCanvas.Create;
g.AntiAlias:=True;
g.AntiAliasText:=gpfBest;
Chart1.Canvas := g;
end;
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 |
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Dear Narcis.
And here the printed chart with gdi+ canvas:
The printed font in the hints and legend looks quite strange.
I see no effect when I set them again after creation.
Release Notes 17th November 2011
TeeChart VCL version 2011
Build 2011.04.41118
http://download.jam-software.de/treesiz ... tPrint.zip
Thanks for your help and best regards.
Please take a look at the printed chart with common canvas:I don't get strange fonts as you did using the code you posted.
And here the printed chart with gdi+ canvas:
The printed font in the hints and legend looks quite strange.
In my version of TeeChart Pro "AntiAlias:=True" and "AntiAliasText:=gpfBest" are the default settings of TGDIPlusCanvas.What about antialiasing GDI+ canvas and font?
I see no effect when I set them again after creation.
From the "Release.txt":If the problem persists could you please let us know the exact TeeChart version you are using
Release Notes 17th November 2011
TeeChart VCL version 2011
Build 2011.04.41118
Please find a sample project hereand attach a simple example project we can run "as-is" to reproduce the problem here
http://download.jam-software.de/treesiz ... tPrint.zip
Thanks for your help and best regards.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Dear marder,
Neither the images nor the examples project links are working. Could you please check them or attach the files in the forums?
Thanks in advance.
Neither the images nor the examples project links are working. Could you please check them or attach the files in the forums?
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 |
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Dear Narcis.
Sorry, the links are currently not available.
I attached the files to this post.
Thanks and best regards.
Sorry, the links are currently not available.
I attached the files to this post.
Thanks and best regards.
- Attachments
-
- TestChartPrint.zip
- pie chart print demo project
- (82.19 KiB) Downloaded 910 times
-
- pie chart with gdi+ canvas
- pie_chart_print_with_gdi_plus_canvas.png (72.93 KiB) Viewed 22591 times
-
- pie chart with common canvas
- pie_chart_print_with_common_canvas.png (76.7 KiB) Viewed 22590 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi marder,
Thanks for the files. I see, fonts could be much better with PrintPartial. I have added the issue (TV52016107) to the bug list. In the meantime, I recommend you to use StretchDraw as explained here. I checked this works fine with your project.
Thanks for the files. I see, fonts could be much better with PrintPartial. I have added the issue (TV52016107) to the bug list. In the meantime, I recommend you to use StretchDraw as explained here. I checked this works fine with your project.
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 |
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Dear Narcis.
Thanks for your help!
Using StrechDraw() with a bitmap seems to work better.
I'm currently trying to include this to my existing code, which is not that easy since there is some other stuff printed beside the chart.
I will contact you again if I need additional help.
Thanks and best regards.
Thanks for your help!
Using StrechDraw() with a bitmap seems to work better.
I'm currently trying to include this to my existing code, which is not that easy since there is some other stuff printed beside the chart.
I will contact you again if I need additional help.
Thanks and best regards.
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Dear Narcis.
Ok, I managed to bring text and chart (bitmap) together on one printed export.
Anyway, when using your workaround the resolution of the printed export is not as good as when using PrintPartial.
This is because, when generating the bitmap, we use the dimensions of the TChart component. For printing the dimensions of the printer are used, since we want to use the whole page.
In case of using the dimensions of the printer also for exporting the bitmap, the hints and the legend are shown unreadable small (See attachment).
Best regards.
Ok, I managed to bring text and chart (bitmap) together on one printed export.
Anyway, when using your workaround the resolution of the printed export is not as good as when using PrintPartial.
This is because, when generating the bitmap, we use the dimensions of the TChart component. For printing the dimensions of the printer are used, since we want to use the whole page.
In case of using the dimensions of the printer also for exporting the bitmap, the hints and the legend are shown unreadable small (See attachment).
Best regards.
- Attachments
-
- pie chart with unreadable small hint and legend
- pie_print_with_too_small_hint_and_legend.png (40.7 KiB) Viewed 22563 times
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi marder,
You could try to increase the marks and legend fonts before generating the image to be printed.
I'd also suggest you to take a look at the printing better article here
You could try to increase the marks and legend fonts before generating the image to be printed.
I'd also suggest you to take a look at the printing better article here
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Printing issue with TeeChart Pro 2011 for Delphi XE2
Hi,
We've just checked it with the actual v2012.07 and the example you posted above now seems to produce nice fonts, using PrintPartial and GDI+
Could you please give it a try?
We've just checked it with the actual v2012.07 and the example you posted above now seems to produce nice fonts, using PrintPartial and GDI+
Could you please give it a try?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |