Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Bild beim Ausdrucken kommt klein raus? (https://www.delphipraxis.net/99256-bild-beim-ausdrucken-kommt-klein-raus.html)

taktaky 9. Sep 2007 15:23


Bild beim Ausdrucken kommt klein raus?
 
Hallo,

im Code finde ich nichts von zoom oder ?
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
Var
  DestRect:TRect;
Begin
 Printer.BeginDoc;

 DestRect.Left:=Printer.Canvas.ClipRect.Left + (Printer.Canvas.ClipRect.Right - Form1.Width) div 1;
 DestRect.Right:=DestRect.Left + Form1.Width;
 DestRect.Top:=Printer.Canvas.ClipRect.Top + (Printer.Canvas.ClipRect.Bottom - Form1.Height) div 1;
 DestRect.Bottom:=DestRect.Top + Form1.Height;
 Printer.Canvas.CopyRect( DestRect, Form1.Canvas, Form1.ClientRect);
 Printer.EndDoc;
end;
Das Bild im Druckvorschau kommt sehr klein raus !!!

bitsetter 9. Sep 2007 20:38

Re: Bild beim Ausdrucken kommt klein raus?
 
Hi,

du kannst ja selber vergrößern:
Delphi-Quellcode:
Const
  Zoom = 10;
begin
...

  Printer.Canvas.CopyRect(Rect(DestRect.Left, DestRect.Top, DestRect.Right* Zoom, DestRect.Bottom* Zoom), Canvas, ClientRect);
  Printer.EndDoc;
Nicht getestet.

taktaky 9. Sep 2007 22:53

Re: Bild beim Ausdrucken kommt klein raus?
 
Delphi-Quellcode:
  _____        ___   __   _   _   _    _____ 
|  _  \     /   | |  \ | | | | / /  | ____| 
| | | |    / /| | |   \| | | |/ /   | |__   
| | | |   / / | | | |\   | | |\ \   |  __| 
| |_| |  / /  | | | | \  | | | \ \  | |___ 
|_____/ /_/   |_| |_|  \_| |_|  \_\ |_____|

taktaky 10. Sep 2007 21:40

Re: Bild beim Ausdrucken kommt klein raus?
 
Mit der Fehlermeldung, habe ich das Problem so gelöst
Delphi-Quellcode:
If FileExists('test.txt') Then
bla bla
else
exit
end;
:mrgreen:
Delphi-Quellcode:
   _____    _____    _   _   _____   _____ 
/  ___| |  _  \  | | | | /  ___/ /  ___/ 
| |     | |_| |  | | | | | |___  | |___ 
| |  _  |  _  /  | | | | \___  \ \___  \ 
| |_| | | | \ \  | |_| |  ___| |  ___| | 
\_____/ |_|  \_\ \_____/ /_____/ /_____/


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:13 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz