YkA1363
سه شنبه 11 مرداد 1390, 13:42 عصر
سلام به همه دوستان
براي چاپ تصوير اسكن شده داخل شي ء image از دستور زير استفاده مي كنم اما تصوير به طور كامل چاپ نمي شه لطف مي كنين راهنمايي كنيد ايراد كارم كجاست؟
procedure TFrmRecive2.BitBtn23Click(Sender: TObject);
var
ScaleX, ScaleY: Integer;
RR: TRect;
Jpg: TJPEGImage;
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, Image1.Picture.Height * ScaleY);
Canvas.StretchDraw(RR, Image1.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;
براي چاپ تصوير اسكن شده داخل شي ء image از دستور زير استفاده مي كنم اما تصوير به طور كامل چاپ نمي شه لطف مي كنين راهنمايي كنيد ايراد كارم كجاست؟
procedure TFrmRecive2.BitBtn23Click(Sender: TObject);
var
ScaleX, ScaleY: Integer;
RR: TRect;
Jpg: TJPEGImage;
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, Image1.Picture.Height * ScaleY);
Canvas.StretchDraw(RR, Image1.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;