How to Format Indian Currency and Amounts in Words in a PDF Form
Question details
The user needs to display numeric amounts in Indian currency format and convert those totals into words (rupees and paise) within a PDF form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating or editing an interactive PDF form that calculates and displays financial totals.
- Observed behavior
- The PDF form requires custom formatting to correctly group Indian currency numbers and display the corresponding text representation.
Ensure your PDF editor supports JavaScript for forms. You will need basic knowledge of JavaScript to implement custom formatting and calculation scripts.
Use Custom JavaScript for Indian Currency and Word Conversion
Implement custom formatting and calculation scripts in your PDF form's text field properties to handle Indian-style grouping and number-to-word conversion.
Because standard PDF currency formats do not include Indian numbering systems (lakhs and crores) or rupees-to-words conversion by default, custom JavaScript using the util.printf method is required to achieve this formatting.
Right-click the text field where the total will appear in your form editor and select Properties.
In the Properties dialog box, click on the Format tab and choose 'Custom' from the Select Format Category dropdown menu.
Click the 'Edit' button next to the Custom Format Script and enter your JavaScript code utilizing the util.printf method for Indian-style digit grouping.
To convert the amount to words, switch to the Calculate tab, select 'Custom calculation script', click 'Edit', and input the script to translate the numeric total into rupees and paise.
Exit editing mode and enter various test values into the form, including zero, decimals, large numbers (lakhs/crores), and negative amounts to ensure the scripts work correctly.

Create and Edit PDF Forms Easily with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to create interactive forms, edit text, and manage documents seamlessly without the need for expensive software.
- 1. Open the PDF: Launch WPS Office and open your existing PDF document.
- 2. Access form tools: Navigate to the Form tab on the top ribbon to access interactive field options.
- 3. Add or edit fields: Insert text fields, format their properties, and customize how data is collected and displayed.
- 4. Save the document: Save your newly customized PDF form to retain all formatting and interactive elements.

Frequently Asked Questions
Why isn't Indian currency formatting available by default in PDF forms?
Most standard PDF format options default to Western numbering systems (millions and billions). Indian numbering uses lakhs and crores, which requires custom JavaScript to group the digits correctly.
Can I use standard calculation options for number-to-word conversion?
No, standard calculations in PDF forms only handle basic math functions like sum or product. Converting numbers to textual words requires a custom JavaScript calculation script.
What is the util.printf method used for in PDFs?
The util.printf method is a built-in JavaScript function used in PDF forms to format numbers, dates, and strings. It is highly useful for defining exact decimal places and appending currency symbols.
How do I test my PDF form calculation scripts?
Switch your PDF editor to 'Hand' or 'Preview' mode, then manually enter test data into the input fields. Check the output fields for correct formatting across zeroes, decimals, and large numbers.




