SetBetweenBorder

function SetBetweenBorder(
  sType: BorderType = null,
  nSize: pt_8 = null,
  nSpace: pt = null,
  r: byte = null,
  g: byte = null,
  b: byte = null,
): void

Description

Specifies the border which will be displayed between each paragraph in a set of paragraphs which have the same set of paragraph border settings.

Parameters

sTypeBorderTypedefault: null

The border style.

nSizept_8default: null

The width of the current border measured in eighths of a point.

nSpaceptdefault: null

The spacing offset between the paragraphs measured in points used to place this border.

rbytedefault: null

Red color component value.

gbytedefault: null

Green color component value.

bbytedefault: null

Blue color component value.

Returns

void

Try It

var oDocument = Api.GetDocument();
var oMyStyle = oDocument.CreateStyle("My document style");
var oParaPr = oMyStyle.GetParaPr();
oParaPr.SetBetweenBorder("single", 24, 0, 255, 111, 61);
var oParagraph = oDocument.GetElement(0);
oParagraph.SetStyle(oMyStyle);
oParagraph.AddText("This is the first paragraph. ");
oParagraph.AddText("The paragraph properties styled above set a border between paragraphs.");
oParagraph = Api.CreateParagraph();
oParagraph.SetStyle(oMyStyle);
oParagraph.AddText("This is the second paragraph. ");
oParagraph.AddText("No need to add anything additionally to it. ");
oParagraph.AddText("The borders between the paragraphs have already been set.");
oDocument.Push(oParagraph);
oParagraph = Api.CreateParagraph();
oParagraph.SetStyle(oMyStyle);
oParagraph.AddText("This is the third paragraph. ");
oParagraph.AddText("No need to add anything additionally to it. ");
oParagraph.AddText("The borders between the paragraphs have already been set.");
oDocument.Push(oParagraph);

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).