Programming/Delphi

퀵리포트 미리보기 없이 이미지로 저장하기

통통만두 2011. 7. 5. 11:36
반응형
var
  BMP : TBitmap;
  StoredUnits : TQRUnit;      
begin
      frmWT4107B0.Prepare;
      StoredUnits := frmWT4107B0.Units;
      frmWT4107B0.Units := Pixels;

      try
        for i := 1 to frmWT4107B0.QRPrinter.PageCount do
        begin
          BMP := TBitmap.Create;
          BMP.Width := Round(frmWT4107B0.Page.Width);
          BMP.Height := Round(frmWT4107B0.Page.Length);
          frmWT4107B0.QRPrinter.PageNumber := i;
          BMP.Canvas.Draw(0, 0, frmWT4107B0.QRPrinter.Page);
          BMP.SaveToFile(StoredPath + 'WT4107B0_' + IntToStr(i));
        end;

      finally
        FreeAndNil(BMP);
      end;
end;
 
반응형