PDFium Delphi Component Docs

PixelsToInches function

Unit: PDFium
Convert a pixel measurement at the given DPI to inches

Syntax

function PixelsToInches(Pixels, 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 a pixel measurement at the given DPI to inches The conversion formula is value / DPI

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

Remarks

Example

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

See Also

PixelsToPoints, PointsToInches, PointsToPixels