TRVPrint.DrawPreview

<< Click to display table of contents >>

TRVPrint.DrawPreview

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

procedure DrawPreview(pgNo: Integer; Canvas:  TCanvas;

  const PageRect: TRVCoordRect);

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.

To draw unscaled page, use DrawPage and DrawPageAt methods.

See also methods:

MakePreview;

MakeScaledPreview;

DrawPage, DrawPageAt.

See also properties:

PreviewCorrection;

PagesCount.

See also events:

OnPrintComponent;

OnPagePrepaint;

OnPagePostpaint.