Click or drag to resize

PdfFieldCalculateValue Method

Calculate (and update) this form field's Value using its calculation script.

Namespace:  RadPdf.Data.Document.Objects.FormFields
Assembly:  RadPdf (in RadPdf.dll) Version: 5.1.0.0 (5.1.0.0)
Syntax
public bool CalculateValue()

Return Value

Type: Boolean
true if all calculations have been completed successfully; otherwise false.
Remarks

The result of evaluating the calculation script is set to this field's Value.

If the form field does not contain a calculation script, this method will return true without updating the field's Value.

Evaluating the calculation script on a single form field may produce unexpected results. Some form field calculations may rely on other calculations to complete first. For best results, evaluate all calculations using CalculateAll.

RAD PDF will only perform simple calculations. RAD PDF attempts to safely reimplement the most commonly used calculation and formatting scripts, including "simplified field notation". More complicated or custom calculation scripts may fail.

This method does NOT execute any JavaScript or other unsafe code. RAD PDF safely parses any JavaScript scripts, identifying patterns commonly used by PDF developers and tools, and internally calculates field values.

See Also