Skip to main content

SetDoubleStrikeout

Specifies that the contents of this paragraph are displayed with two horizontal lines through each character displayed on the line.

Syntax

expression.SetDoubleStrikeout(isDoubleStrikeout);

expression - A variable that represents a ApiParagraph class.

Parameters

NameRequired/OptionalData typeDefaultDescription
isDoubleStrikeoutRequiredbooleanSpecifies that the contents of the current paragraph are displayed double struck through.

Returns

ApiParagraph

Example

This example applies double strikeout formatting to paragraph text.

const doc = Api.GetDocument();
const page = doc.GetPage(0);

const fill = Api.CreateSolidFill(Api.HexColor('#FF6F3D'));
const stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = Api.CreateShape('roundRect', Api.MillimetersToEmus(300), Api.MillimetersToEmus(130), fill, stroke);
shape.SetPosition(Api.MillimetersToEmus(20), Api.MillimetersToEmus(35));
const docContent = shape.GetContent();
const paragraph = docContent.GetElement(0);
paragraph.AddText('This is a paragraph with the text struck out with two lines.');
paragraph.SetDoubleStrikeout(true);
page.AddObject(shape);