跳到主要内容

InchesToPoints

Converts inches to points.

Syntax

expression.InchesToPoints(inches);

expression - A variable that represents a Api class.

Parameters

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

Returns

number

Example

This example shows how to convert inches to points.

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

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