PDF Editing Issues

How to Fix Acrobat Custom Format Script Failing in Adobe Reader

Adam DavisAdam Davis Nov 3, 2026 869 views

Question details

The user needs to know why a JavaScript custom format script successfully executes during Acrobat Preview but fails when editing PDF text fields in Adobe Reader.

Fixing Acrobat Custom Format Scripts that Fail in Adobe Reader
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Using custom JavaScript formatting on text fields in a fillable PDF form.
Observed behavior
The custom formatting script functions correctly in Acrobat Preview but does not apply properly when the document is opened and filled out in Adobe Reader.
Before you start

Ensure you are testing the PDF file on a supported desktop operating system, as mobile PDF viewers often restrict or disable JavaScript form calculations and formatting by default.

Solution 1Recommended

Disable Allow Rich Text Formatting for the Form Field

Turning off rich text formatting ensures the JavaScript format script can successfully read and modify the field's value in Adobe Reader without formatting conflicts.

When 'Allow Rich Text Formatting' is enabled, the underlying data structure of the text field becomes more complex to handle varied styling. This added complexity can prevent custom JavaScript format scripts from functioning correctly in Adobe Reader, even if they work perfectly in Acrobat's preview mode.

1
Enter Prepare Form Mode

Open your PDF document in Adobe Acrobat, navigate to the Tools menu, and select 'Prepare Form' to begin editing the fields.

2
Access Field Properties

Right-click the specific text field that is failing to run the formatting script, then select 'Properties' from the context menu.

3
Modify Options

In the Text Field Properties dialog box, click on the 'Options' tab to view the behavior and formatting settings.

4
Disable Rich Text

Uncheck the box labeled 'Allow Rich Text Formatting', then click the 'Close' button to save the properties for that field.

5
Test the Output

Save the PDF file, close Adobe Acrobat, and open the saved document in Adobe Reader to verify that the custom format script now works as intended.

Disable Allow Rich Text Formatting for the Form Field
Desktop Environment Checks: If the script still does not run, double-check that you are opening the file on a desktop application, as most mobile readers disable JavaScript.

Create and Edit PDFs Effortlessly with WPS Office

Simplify your PDF workflow with WPS Office. Manage, edit, and fill PDF documents easily without worrying about complex JavaScript compatibility issues. WPS Office provides an intuitive interface for all your document needs.

  1. 1. Download WPS Office: Install WPS Office for free from the official website and launch the application on your computer.
  2. 2. Open Your PDF: Click 'Open' on the homepage dashboard and select the PDF document you want to edit or fill.
  3. 3. Use PDF Tools: Navigate to the 'PDF Edit' tab to modify document text directly or fill existing form fields visually.
  4. 4. Save and Share: Save your completed PDF; the output remains fully compatible with other standard PDF viewing applications.
Easily view, edit, and fill PDF document form fields with a user-friendly visual interface.Highly compatible with standard PDF formats as well as Microsoft Office Word, Excel, and PowerPoint files.Lightweight application design that ensures smooth performance across different desktop devices.Includes comprehensive tools to securely convert, merge, compress, and split PDF pages.
QA img-9

Frequently Asked Questions

Why do PDF JavaScripts fail on mobile devices?

Most mobile PDF viewers have limited or no support for JavaScript due to system resource limitations and security constraints. Custom format scripts usually require a standard desktop PDF application to function correctly.

Will disabling rich text formatting change how my text looks?

Disabling rich text formatting removes the ability to apply varied styling (like bolding a single word) inside the same field. However, it forces the text into plain text mode, which guarantees your custom formatting script can process and format the input reliably.

Can I fully test my PDF form scripts without leaving Adobe Acrobat?

While Acrobat's 'Preview' mode gives a quick look at form behavior, it may not perfectly replicate end-user conditions. It is highly recommended to always test your final form by opening the saved PDF in the standard desktop Adobe Reader.