rvico TRichView Reference | TRVPrint

TRVPrint.DrawPreview

Top  Previous  Next

Draws print preview of the pgNo-th page to PageRect rectangle of Canvas.

procedure DrawPreview(pgNo: Integer; Canvas:  TCanvas; const PageRect: TRect);

There is more convenient way to display print preview: TRVPrintPreview component.

The page image is scaled to fit PageRect. To maintain correct proportions, you can use Preview100PercentWidth and Preview100PercentHeight properties.

pgNo must be in range from 1 to PagesCount.

You need to assign source document for printing (AssignSource method) and format pages (FormatPages method) before calling this method.

See also methods:

MakePreview;

MakeScaledPreview.

See also properties:

PreviewCorrection;

PagesCount.

See also events:

OnPrintComponent;

OnPagePrepaint;

OnPagePostpaint.


TRichView © trichview.com