12-04-2010, 07:03 AM
12-04-2010, 03:14 PM
وعليكم السلام ورحمة الله
...
PHP كود :
uses
Graphics, Printers,
JPEG; { For JPEG image support }
// ...
{ With scaling support }
procedure PrintFile(sImageFileName: string);
var
TempImage: TImage;
begin
try
TempImage := TImage.Create;
with TempImage do begin
Visible := False;
Stretch := False;
with Picture do begin
AutoSize := True; { So the component will have the right size }
LoadFromFile(sImageFileName);
AutoSize := False;
with Printer do begin
BeginDoc;
if Height > Canvas.Height then
Height := Canvas.Height;
if Width > Canvas.Width then
Width := Canvas.Width;
EndDoc;
end;
end;
end;
finally
TempImage.Free;
end;
end;
13-04-2010, 12:20 PM
شكرا
جزاك الله كل خير
ياريت لو توضح اكثر بمثال
جزاك الله كل خير
ياريت لو توضح اكثر بمثال