PDF Editing Issues

How to Convert Numeric Amounts to Words in a PDF Form

Steve KSteve K Oct 28, 2026 869 views

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.

How to Convert a Numeric Amount to Words in a PDF Form
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.
Before you start

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.

Solution 1Recommended

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.

1
Prepare the Input and Output Fields

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'.

2
Access the Output Field Properties

Right-click the 'AmountInWords' field, select Properties from the context menu, and navigate to the 'Calculate' tab.

3
Enter the Custom Script

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.

4
Save and Test the Form

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.

Apply a Custom JavaScript Calculation Script
JavaScript Requirements: Writing a comprehensive number-to-words JavaScript function from scratch can be complex, as it must handle hundreds, thousands, and decimal (cents) logic. It is highly recommended to search Adobe user forums or JavaScript repositories for pre-written number-to-words scripts tailored for PDFs.
Advanced PDF Form Editing

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. 1. Open WPS PDF: Launch WPS Office and open your PDF document using the built-in PDF editor.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access various interactive form field options.
  3. 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. 4. Save the Form: Once your form is complete, click 'Save' to export the fillable PDF to share with your users.
Easily insert text fields, checkboxes, and dropdown menus into your PDF documents.Highly compatible with standard PDF forms and Adobe Acrobat files.Lightweight software with an intuitive interface for seamless document management.Supports cross-platform PDF editing on Windows, Mac, and mobile devices.
microsoft office alternative - wps office

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').