<< Click to display table of contents >>


Specifies number of pixels in one inch.

property UnitsPixelsPerInch: Integer;

(introduced in version 18)

This property is applied to:

values (of TRVStyleLength type) measured in Units: TRVStyleUnits, if Units = rvstuPixels;

values (of TRVLength type) measured in TRVUnits , if Units = rvuPixels;

values measured in pixels (of TRVPixelLength type);

sizes of pictures in documents (if they are not resized by the user).

When displaying these sizes on a device (screen or paper), they are recalculated according to the device resolution, so these sizes are device-independent.

It's highly recommended to leave the default value of this property (96). With this setting, pixels in TRichView are similar to pixels in HTML (which also assume 96 DPI).

Alternatively, you can assign a value of Screen.PixelsPerInch to this property, to measure values in screen pixels (as it was default in TRichView versions prior to 18).

You can implement zooming using this property (for example, if UnitsPixelsPerInch = 48, value = 100 is displayed in 96 DPI as 100 * 96 / 48 = 200, i.e. 200% zoom). However, it is highly not recommended, because:

this setting affects everything (file import and export, printing), not only displaying ion the screen;

this setting does not affect text size.

The recommended way of zooming is changing TRichView.DocumentPixelsPerInch property.

RichViewActions note

If you use TRVRuler from RichViewActions, after changing value of UnitsPixelsPerInch, you need to change the ruler's UnitsPixelsPerInch accordingly:

  RVRuler1.UnitsPixelsPerInch := 


The same for TrvActionPageSetup:

  rvActionPageSetup.UnitsPixelsPerInch := 


Default value:


See also:

Units of measurement in TRichView