How to Convert Numeric Amounts to Words in a PDF Form
Question details
The user wants to automatically convert numeric inputs, such as currency amounts, into written text within a separate fillable text field in a PDF document.

- Product
- PDF Forms / Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating or editing a fillable PDF form (like an invoice or check) that requires the spelled-out word equivalent of a numeric currency value.
- Observed behavior
- PDF forms do not have a native, built-in function to automatically spell out numbers into words, requiring users to either type the text manually or implement custom scripting.
Ensure you have access to a desktop PDF editor that supports JavaScript calculations and verify the exact field names of your numeric inputs before applying any scripts.
Apply a Custom JavaScript Calculation Script
Since PDF formats lack a native number-to-words feature, you must apply a custom JavaScript function to parse the number and generate the text output.
PDF forms utilize JavaScript for complex field calculations. To achieve this conversion, you will need two fields: an input field for the numeric amount (e.g., 'AmountBox') and an output field for the written text (e.g., 'WordsBox'). The conversion script must be applied to the output field's calculation tab.
Open your PDF editor in form preparation mode. Ensure you have an input text field named 'Amount' (formatted for numbers) and a separate output text field named 'AmountInWords'.
Right-click the 'AmountInWords' field, select Properties from the context menu, and navigate to the 'Calculate' tab.
Select the option for 'Custom calculation script' and click the 'Edit' button. Paste an appropriate JavaScript number-to-words conversion algorithm, ensuring the script retrieves the input value using this.getField("Amount").value.
Click OK to save the script and close the properties dialog. Switch your PDF editor to Preview mode, type a number like 1250.00 into the Amount field, and press Enter to see it converted to words in the output field.

Create and Edit Fillable PDF Forms with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to create, edit, and manage fillable PDF forms effortlessly. It serves as a lightweight, user-friendly, and cost-effective solution for handling professional PDF documents.
- 1. Open WPS PDF: Launch WPS Office and open your PDF document using the built-in PDF editor.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access various interactive form field options.
- 3. Add and Edit Fields: Click on 'Text Field' to insert new input boxes, and double-click them to adjust properties, styling, and formatting.
- 4. Save the Form: Once your form is complete, click 'Save' to export the fillable PDF to share with your users.

Frequently Asked Questions
Can I convert numbers to words in a PDF without using JavaScript?
No, standard PDF specifications do not include a built-in formula or formatting option to automatically spell out numbers. Custom JavaScript is mandatory to process the numeric input and generate the corresponding text string.
Why isn't my JavaScript calculation updating the text field?
This typically occurs if the field calculation order is incorrect or if there is a syntax error in your JavaScript code. Ensure the output text field is configured to calculate after the input field, and check your PDF editor's JavaScript console for syntax errors.
Does this calculation script work on mobile PDF viewers?
Most mobile PDF viewers and web browsers do not fully support advanced JavaScript calculations in forms. For the number-to-words script to function reliably, users typically need to open and fill the form using a robust desktop PDF application.
How do I handle decimals or cents in the conversion script?
Your JavaScript code must be explicitly written to split the input value at the decimal point. The whole number portion is converted to words (e.g., 'One Hundred'), and the decimal portion is usually appended as a fraction (e.g., 'and 50/100 Dollars').




