Skip to content
Lamina PDF
0.9.0
GitHub
Open the web app

NewText

Defined in: packages/sdk/src/types.ts:2090

What DocumentContent.addText puts on a page: its ID (as NewContentObject’s), the box rect in page space, [x0, y0, x1, y1] from the page’s top-left corner, the text in runs (a line feed in a run starts a paragraph), and a PDF date for the form’s /LastModified.

fonts is the font, then the fallbacks tried in order for a character it lacks: "helvetica", "times" or "courier" (every reader has them), or the ID Document.addBlob gave a font’s bytes, which are embedded as a subset. Helvetica when absent. The text wraps at the box’s width and is clipped to it.

0.7.0

readonly align?: TextAlign;

Defined in: packages/sdk/src/types.ts:2095

Left when absent.


readonly color?: AnnotColor;

Defined in: packages/sdk/src/types.ts:2100

Black when absent.


readonly fonts?: readonly string[];

Defined in: packages/sdk/src/types.ts:2096


readonly id: string;

Defined in: packages/sdk/src/types.ts:2091


readonly modified: string;

Defined in: packages/sdk/src/types.ts:2104

A PDF date, such as "D:20261118120000Z".


readonly rect: readonly [number, number, number, number];

Defined in: packages/sdk/src/types.ts:2092


readonly runs: readonly TextSpan[];

Defined in: packages/sdk/src/types.ts:2093


readonly size?: number;

Defined in: packages/sdk/src/types.ts:2098

In points, from 1 to 500; 12 when absent.


readonly tag?: TagChoice;

Defined in: packages/sdk/src/types.ts:2102

A paragraph when absent.