Print as Image

General TRichView support forum. Please post your questions here
Post Reply
gully
Posts: 16
Joined: Tue Sep 13, 2005 10:08 am
Location: Czech Republic
Contact:

Print as Image

Post by gully »

Hi Sergey,
I need to do print from TRichView with use of FastReport, and for that I would like to use bitmap.
Now I use the following procedure:

Code: Select all

procedure PrintAsBitmap(Source:TCustomRichView; DestDir: string);
 var
  rvPrnt: TRVPrint;
  bmp: TBitmap;
  I: integer;
begin
  DestDir := IncludeTrailingPathDelimiter(DestDir);
  bmp := TBitmap.Create;
  rvPrnt := TRVPrint.Create(Self);
  try
    rvPrnt.AssignSource(Source);
    rvPrnt.FormatPages(rvdoALL);
    for I := 1 to rvPrnt.PagesCount do
    begin
      rvPrnt.MakePreview(I, bmp);
      bmp.SaveToFile(DestDir + 'Bitmap_' + IntToStr(I) + '.bmp')
    end;
  finally
    rvPrnt.Free;
    bmp.Free
  end
end;
... but I will need higher resolution of the bitmap.
I would like to ask you, how can I get higher resolution of the bitmap?
Thank you for your answer.
Last edited by gully on Thu Nov 12, 2009 1:48 am, edited 1 time in total.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can use MakeScaledPreview to draw preview in larger bitmap.
Post Reply