跳到主要内容

PicasToPoints

将派卡转换为磅。

语法

expression.PicasToPoints(pc);

expression - 表示 Api 类的变量。

参数

名称必需/可选数据类型默认值描述
pc必需number要转换为磅的派卡数。

返回值

number

示例

将派卡测量值转换为排版磅并在文档中显示结果。

// How do I find the point equivalent of a value given in picas in a document?

// Write out how many points correspond to a specific number of picas in a document.

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

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