function PixelsToPoints(Pixels, PixelsPerInch: Double): Double;
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 PDF points (1/72 inch). The conversion formula is value * 72 / DPI
Unit-level helper function in the PDFium unit; can be called without instantiating TPdf (e.g. PixelsToPoints(96, 96))
PixelsPerInch*To* functions on TPdf and TPdfView
var
Margin: Double;
begin
Margin := PixelsToPoints(300, 96);
Memo1.Lines.Add(Format('PixelsToPoints(300, 96) = %.4f', [Margin]));
end;