Hi all,
I found a very annoying printing issue for the Rectangles and Annotations object in TeeChart VCL. It seems that their position is changing between the print preview and the final paper printing. As it was quite hard to send you my paper print, I made some print with my virtual PDF printer : it creates PDF instead of sending the chart to the real printer. Anyway the result is the same in both case (PDF or paper) : there's a discrepancy between the print preview and the print.
Print preview screenshot will all margins set to 10%:
PDF screenshot of the printing with all margins set to 10%:
With further investigations, I found out that the only case where this bug does not occur is when all margins are set to zero.
Print preview screenshot with all margins set to zero:
PDF Screenshot of the printing with all margins set to zero:
Regards,
Kitry
Printing bug for Annotation and Rectangle objects
Printing bug for Annotation and Rectangle objects
TeeChart Pro VCL/CLX V7.07 - Delphi 6 US Entreprise Edition with Update Pack 2 + RTL2 + RTL3 - W2k Pro SP2 French Version
-
- 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 |
in this post, I found the following code :
But if I include this in my application, it raises the following error :
"Undeclared identifier : Printer"
"Undeclared identifier : poPortrait"
Code: Select all
procedure TForm1.BitBtn1Click(Sender: TObject);
var meta : TMetafile;
begin
Chart1.BevelOuter := bvNone;
Meta := Chart1.TeeCreateMetafile(True, Chart1.ClientRect);
try
[b]Printer[/b].Orientation := [b]poPortrait[/b];
Printer.BeginDoc;
try
Printer.Canvas.StretchDraw(Rect(1,1,Printer.PageWidth - 1,
Printer.PageHeight - 1),Meta);
finally
Printer.EndDoc;
end;
finally
Meta.Free;
Chart1.BevelOuter := bvRaised;
end;
end;
"Undeclared identifier : Printer"
"Undeclared identifier : poPortrait"
TeeChart Pro VCL/CLX V7.07 - Delphi 6 US Entreprise Edition with Update Pack 2 + RTL2 + RTL3 - W2k Pro SP2 French Version
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kitry,
You need to add Printers unit in your form's uses section.
You need to add Printers unit in your form's uses section.
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 |
Hi Narcís,
Thanks. I just found it and already made some tests.
Well, this method is not really better. Depending on the printer you're using, the result is for the best only stretched and for the worst mostly unreadable.
I'm sorry but this is really not satisfying for end users. I'm already hearing them complaining about the bad quality of the printing.
Wouldn't it be more accurate to solve the initial print problem that I raised in the beginning of this post ? It doesn't sound unrealistic to me ?
Cheers,
Kitry
Thanks. I just found it and already made some tests.
Well, this method is not really better. Depending on the printer you're using, the result is for the best only stretched and for the worst mostly unreadable.
I'm sorry but this is really not satisfying for end users. I'm already hearing them complaining about the bad quality of the printing.
Wouldn't it be more accurate to solve the initial print problem that I raised in the beginning of this post ? It doesn't sound unrealistic to me ?
Cheers,
Kitry
TeeChart Pro VCL/CLX V7.07 - Delphi 6 US Entreprise Edition with Update Pack 2 + RTL2 + RTL3 - W2k Pro SP2 French Version
Hi Kitry,
this problem has been fixed for the next TeeChart Pro v8 (which we're working).
In meantime another solution is to set the correct position based on the paper rect before the Chart is printed, plesae see the code below :
this problem has been fixed for the next TeeChart Pro v8 (which we're working).
In meantime another solution is to set the correct position based on the paper rect before the Chart is printed, plesae see the code below :
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
if printed then
begin
printed := false;
charttool1.Left:=oldleft;
charttool1.top:=oldTop;
end;
end;
procedure TForm1.Chart1BeforePrint(Sender: TCustomTeePanel; Canvas: TCanvas;
var R: TRect);
begin
oldleft:=charttool1.Left;
oldtop:=charttool1.Top;
ChartTool1.Left:=R.Left+ChartTool1.Left;
ChartTool1.Top:=R.Top+ChartTool1.Top;
printed:=true;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com