function PixelsToPoints(Pixels, PixelsPerInch: Double): Double;
Static helper converting a measurement 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 functions in the PDFium unit; callable without instantiating TPdf (e.g. PixelsToPoints(96, 96))
PixelsPerInch (96 for a standard screen)*To* functions on TPdf and TPdfView
var
Margin: Double;
begin
Margin := PixelsToPoints(300, 96);
Memo1.Lines.Add(Format('PixelsToPoints(300, 96) = %.4f', [Margin]));
end;