How Export rvf file to Jpeg
Posted: Thu Feb 18, 2016 9:52 am
How Export rvf file to Jpeg.
Thanks.
Thanks.
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://trichedit.com/forums/
Code: Select all
procedure SavePageAsJpeg(SRV: TSRichViewEdit; PageNo: Integer; const FileName: String);
var
bmp: TBitmap;
jpg: TJPEGImage;
begin
bmp := TBitmap.Create;
try
bmp.Width := SRV.PageWidth100Pix;
bmp.Height := SRV.PageHeight100Pix;
SRV.DrawPage(PageNo, bmp.Width, bmp.Height, 0, 0, bmp.Canvas,
False, True, False, False);
jpg := TJPEGImage.Create;
try
jpg.Assign(bmp);
jpg.SaveToFile(FileName);
finally
jpg.Free;
end;
finally
bmp.Free;
end;
end;
procedure TForm3.ToolButton79Click(Sender: TObject);
var
i: Integer;
begin
for i := 1 to SRichViewEdit1.PageCount do
SavePageAsJpeg(SRichViewEdit1, i, ExtractFilePath(Application.ExeName) +
'page' + IntToStr(i) + '.jpg');
end;