Skip to main content

GetValue

Gets field value

Inherited from ApiBaseField.GetValue.

Example

Get value from first text field and set to second text field in a PDF document.

// How can I get the value using a base field in a PDF document?

// Get the value for a base field in a PDF document.

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

let textField1 = Api.CreateTextField([10, 10, 160, 30]);
let textField2 = Api.CreateTextField([10, 40, 160, 60]);

page.AddObject(textField1);
page.AddObject(textField2);

textField1.SetValue('Name Surname');
textField2.SetValue(textField1.GetValue());