跳到主要内容

PointsToInches

Converts points to inches.

Syntax

expression.PointsToInches(pt);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
ptRequirednumberThe number of points to convert to inches.

Returns

number

Example

This example shows how to convert points to inches.

const doc = Api.GetDocument();
const paragraph = Api.CreateParagraph();

const points = 1000;
const inches = Api.PointsToInches(points);
paragraph.AddText(points + ' points are equal to ' + inches + ' inches.');
doc.Push(paragraph);