SetTextPr

SetTextPr(oTextPr) → { boolean }

Inherited From: ApiFormBase#SetTextPr

Sets the text properties to the current form. Used if possible for this type of form

Parameters:

Name Type Description
oTextPr ApiTextPr

The text properties that will be set to the current form.

Returns:

Type
boolean

Example

Copy code
builder.CreateFile("pdf");
var oDocument = Api.GetDocument();
var oDateForm = Api.CreateDateForm({"key": "Nowadays", "tip": "Enter current date", "required": true, "placeholder": "Date", "format": "mm.dd.yyyy", "lang": "en-US"});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oDateForm);
var oTextPr = Api.CreateTextPr();
oTextPr.SetFontSize(30);
oTextPr.SetBold(true);
oDateForm.SetTextPr(oTextPr);
builder.SaveFile("pdf", "SetTextPr.pdf");
builder.CloseFile();

Resulting document