SetPosition

function SetPosition(nPosition: hps = null): ApiRange | "null"

Description

Specifies the amount by which text is raised or lowered for the current Range in relation to the default baseline of the surrounding non-positioned text.

Parameters

nPositionhpsdefault: null

Specifies a positive (raised text) or negative (lowered text) measurement in half-points (1/144 of an inch).

Returns

ApiRange | "null"

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is just a sample text. ");
oParagraph.AddText("This is a text run with the text raised 5 points (10 half-points).");
var oRange = oDocument.GetRange(22, 75);
oRange.SetPosition(10);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).