This example shows an open dialog to render a NDR file to JPEG images
procedure TForm1.RenderNDRToJPEG(Sender: TObject);
var
OpenDialog: TOpenDialog;
RvRenderGraphic: TRvRenderGraphic;
FileStream: TFileStream;
begin
OpenDialog := TOpenDialog.Create(Self);
RvRenderGraphic := TRvRenderGraphic.Create(Self);
try
OpenDialog.Filter := 'NDF Files|*.NDR';
RvRenderGraphic.Format := wpJPEG;
if OpenDialog.Execute then
begin
FileStream := TFileStream.Create(OpenDialog.FileName, fmOpenRead);
try
// We simply pass OpenDialog.FileName -
// the component will choose the propper extension!
RvRenderGraphic.PrintRender(FileStream, OpenDialog.FileName);
finally
FileStream.Free;
end;
end;
finally
OpenDialog.Free;
RvRenderGraphic.Free;
end;
end; |
LICENSE
You may use this unit in your application without charge and distribute it in binary form. You may use the unit with your component but the copyright note must be left intact. You may not extract parts of this unit and use it in your component unless you also copy the copyright note to the beginning of your unit.
The software distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
DOWNLOAD wp_rave_01.zip
|