07-06-2024, Saat: 18:28
Merhabalar
Formdaki Image nesnesini nasıl yazdırabilirim?
Nette bi çok kod var ama hep yazıcıdan boş kağıt çıkıyor.
Örnek
Formdaki Image nesnesini nasıl yazdırabilirim?
Nette bi çok kod var ama hep yazıcıdan boş kağıt çıkıyor.
Örnek
procedure TKomisyonFisiEvrakF.resim_yazdir(Image:TImage); var ScaleX, ScaleY: Integer; RR: TRect; begin with Printer do begin BeginDoc; // Mit BeginDoc wird ein Druckauftrag initiiert. // The StartDoc function starts a print job. try ScaleX := GetDeviceCaps(Handle, logPixelsX) div PixelsPerInch; ScaleY := GetDeviceCaps(Handle, logPixelsY) div PixelsPerInch; // Informationen über die Auflösung // Retrieves information about the Pixels per Inch of the Printer. RR := Rect(0, 0, Image1.picture.Width * scaleX, Image.Picture.Height * ScaleY); Canvas.StretchDraw(RR, Image.Picture.Graphic); // An die Auflösung anpassen // Stretch to fit finally EndDoc; //Methode EndDoc beendet den aktuellen Druckauftrag und schließt die // Textdatei-Variable. // Steht in finally - um auch bei Abbruch des Druckauftrages Papierausgabe // sicherzustellen end; end; end;