You can PaintTo into a TBitmap, and the StretchDraw the bitmap onto the
Printer Canvas.
This works for some printers.
But the robust solution is to copy the bitmap into a Device Independent
bitmap (with GetDIB) and use StretchDIBits.
(I have some code for this if it's any help).
Regards, Paul Marshall.
> -----Original Message-----
> From: Leo Ramakers [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, January 07, 2000 10:17 AM
> To: Multiple recipients of list delphi
> Subject: [DUG]: scaling a print
>
> hi folks
> I am trying to print the displayed content a pagecontrol, and have
> succeeded in getting print using the following code;
> if PrintDialog1.Execute then
> begin
> ......
> with Printer do
> begin
> BeginDoc;
> for I := Start to Stop do
> begin
> PageControl.Pages[I].PaintTo(Handle, 10, 10);
> if I <> Stop then
> NewPage;
> end;
> EndDoc;
> end;
>
> end;
>
> The problem is, I cant see how to scale the print to fit the page. I have
> the same problem if I try
>
> Mainform.Print
>
> Can anyone offer solution or tips?
>
> best regards
> Leo Ramakers
>
> --------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz