GetTextPr

GetTextPr() → { ApiTextPr }

Inherited From: ApiFormBase#GetTextPr

Returns the text properties from the current form. Used if possible for this type of form

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiTextPr

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);
var oFormTextPr = oDateForm.GetTextPr();
oFormTextPr.SetItalic(true);
oDateForm.SetTextPr(oFormTextPr);
builder.SaveFile("pdf", "GetTextPr.pdf");
builder.CloseFile();

Resulting document