Docs de PDFiumVCL

PixelsToInches method

Esta entrada API conserva identificadores, firmas, bloques de código y términos PDF en su forma original.
Component: TPdf  ·  Unit: PDFium
Convert a pixel measurement at the given DPI to inches.

Syntax

class function PixelsToInches(Pixels: Integer; DPI: Integer = 96): 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.

These helpers are class functions; you can call them without instantiating TPdf (e.g. TPdf.PixelsToInches(96)).

Remarks

Example

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

See Also

PixelsToPoints, PointsToInches, PointsToPixels