TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

SetTime

SetTime(nTimeStamp) → { boolean }

Sets the timestamp to the current form.

Parameters:

Name Type Description
nTimeStamp number

The timestamp that will be set to the current date 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);
oDateForm.SetTime(new Date().getTime());
builder.SaveFile("pdf", "SetTime.pdf");
builder.CloseFile();

Resulting document