Page 1 of 1

Printing in CLX

Posted: Thu Sep 23, 2004 2:11 pm
by 9338558
I am having a problem printing in CLX. This is just a real basic print. All I am doing is printing my chart to the top half of a page.

Printer.BeginDoc; { <-- start printer job }
try
arect.Left := 10;
arect.Right := Printer.PageWidth - 10;
arect.Top := 10;
arect.Bottom := (Printer.PageHeight - 10) div 2;
Chart1.PrintPartial(aRect);
finally
Printer.EndDoc; { <-- end job and print !! }
end;

What I get is a small picture at the top left corner of the screen (everything is jumbled together).

If I use this same code in VCL I get the picture correctly.

Any suggestions?

Thanks

Posted: Fri Sep 24, 2004 10:44 am
by Marjan
Hi.

Have you checked if Printer.PageWidth and Printer.PageHeight return the same values as in VCL version ? What happens if you set arect.Right and arect.Bottom to some specific lavel (like 3000, 2000) ?

Posted: Mon Sep 27, 2004 1:20 pm
by 9338558
I checked the Printer.PageWidth and Printer.PageHeight in both CLX and VCL.
CLX version - PageWidth = 5100 PageHeight = 6600
VCL version - PageWidth = 4800 PageHeight = 6400

Not much different.

I also tried setting arect.Width to 2000 and arect.Height to 3000 with no effect. I did notice something interesting as I have been trying to make this work - When I set the PrintResolution := -300 I get a larger picture with font staying the same( the higher the negative number the larger the picture). If I set the PrintResolution := 100 I get a smaller picture but font stays the same.

I forgot to mention before that I am using Delphi 7 with TeeChart Pro 7.

Thanks again for your help.

Posted: Thu Oct 07, 2004 11:09 am
by Marjan
Hi.

It appears the problem is in TeeProcs.pas unit, more precisely in the PrintPartialCanvas method implementation. With all those $IFDEF CLX conditional defines the scale factor is not set if application is running on CLX platform. I'll investigate this a bit closer and also log it to our bug list.