Fix PDF Form Calculations Not Working After Opening in Mac Preview
Question details
Interactive PDF form calculations break or stop functioning completely after the file is opened or modified in Apple's Preview application on macOS.

- Product
- Device & OS
- macOS
- Scenario
- A user attempts to fill out an interactive PDF form that relies on automatic calculations, but the functionality breaks when using the default Mac viewer.
- Observed behavior
- The PDF calculations function properly in dedicated PDF software but become permanently corrupted and stop calculating once the file is opened and saved in the Mac Preview app.
Before proceeding, please ensure you have an original, unedited copy of your PDF form, as files previously opened and saved in Mac Preview may have their interactive elements permanently damaged.
Change Your Default PDF Viewer to a Dedicated Editor
Apple's Preview app alters PDF structures and corrupts JavaScript calculations. Bypassing Preview and setting a proper PDF editor as your default application will resolve the issue.
Mac Preview is known to lack proper support for complex PDF forms containing interactive JavaScript. Simply opening and saving these documents in Preview can permanently strip or corrupt the underlying code responsible for the calculations.
Install a professional PDF software such as WPS Office or Adobe Acrobat Reader, which have built-in engines capable of processing JavaScript-based form calculations.
Right-click on your original, uncorrupted PDF file in Finder and select 'Get Info' from the context menu.
Expand the 'Open with' section, click the dropdown menu, and select your newly installed PDF editor. Click the 'Change All...' button to ensure all future PDFs open correctly.
Double-click the fresh PDF file to open it in your dedicated editor, where you can now input data and watch the calculations execute accurately.

Recover Data from a Corrupted PDF Form
If you have already lost form functionality after saving in Preview, you must recover your data manually using a fresh copy of the document.
Fill and Edit Interactive PDF Forms Seamlessly with WPS Office
WPS Office includes a robust, built-in PDF reader and editor that fully supports complex interactive form fields and JavaScript calculations. You can easily bypass Mac Preview's limitations and prevent document corruption.
- 1. Open WPS Office: Launch WPS Office on your Mac and navigate to the 'PDF' tab on the home screen.
- 2. Open Your PDF Form: Click 'Open' and select your original interactive PDF form. Make sure to use a file that has not been previously saved in Preview.
- 3. Fill the Form Fields: Click directly into the highlighted form fields to enter your data. The integrated JavaScript engine will handle all calculations automatically in real time.
- 4. Save the Document Securely: Click 'Menu' in the top-left corner and select 'Save' (or press Cmd+S) to securely save your document without corrupting the interactive elements.

Frequently Asked Questions
Why does Mac Preview break PDF form calculations?
Apple's Preview application lacks full support for the JavaScript coding used in interactive PDF forms. When Preview opens and saves these files, it often rewrites the PDF architecture, stripping out or corrupting the code responsible for the automated calculations.
Can I fix the calculations on a PDF after it has been saved in Preview?
No. Once Preview overwrites the file and strips the interactive data, it is usually permanently corrupted. You will need to obtain a fresh, original copy of the PDF form and open it in a compatible PDF editor.
How can I prevent PDFs from opening in Preview automatically?
You can change your default PDF viewer. Right-click any PDF file in Finder, select 'Get Info', locate the 'Open with' dropdown, choose a robust PDF editor like WPS Office, and click the 'Change All' button to apply this setting system-wide.




