PDFium Delphi Component Docs

PointsToPixels function

Unit: PDFium
Convert PDF points to pixels at the given DPI

Syntax

function PointsToPixels(Points: Double; PixelsPerInch: Double): Double;

Description

Static helper that converts a measurement value between pixel / point / inch units. PDF coordinates are expressed in points (1 pt = 1/72 inch)

Convert PDF points to pixels at the given DPI The conversion formula is Points * PixelsPerInch / 72

Unit-level helper functions in the PDFium unit; callable without instantiating TPdf (e.g. PointsToPixels(72, 96))

Remarks

Example

var
  Margin: Double;
begin
  Margin := PointsToPixels(72, 96);
  Memo1.Lines.Add(Format('PointsToPixels(72, 96) = %.4f', [Margin]));
end;

See Also

PixelsToInches, PixelsToPoints, PointsToInches