How to fix PDF Form With Blank Fields

This weekend I had the opportunity to discover a PDF form which wasn’t displaying properly in Adobe Reader.

Upon further investigation I found out that the cause of the problem was Preview.app on OSX. Preview edits forms but corrupts them when saving so that the fields appear blank in Adobe Reader. The data is still there, but it’s not visible.

You saved a form in Preview. It's not your fault, you didn't know better.
You saved a form in Preview. It’s not your fault, you didn’t know better.
Now the form looks blank. Don't worry though, we're about to get it back.
Now the form looks blank in Adobe Reader. Don’t worry though, we’re about to get it back.

The first script I found requires Adobe Acrobat, but doesn’t work with Reader. Eventually I found this website with a solution for Adobe Reader. Fix blank fields in forms corrupted by OSX Preview.

 

Copy the Fix Field Appearances Script found here. Paste it into TextEdit and then convert to Plain Text (Format -> Make Plain Text).

Make the script into plain text
Make the script into plain text
Save it to your Desktop as fix_forms.js
Save it to your Desktop as fix_forms.js

Or just download it here.

Now we need to create the destination folder and copy it.

On OSX it needs to go in: /Users/YourUserName/Library/Application Support/Adobe/Acrobat/11.0/JavaScripts

On Windows it needs to go in: C:\Users\George\AppData\Roaming\Adobe\Acrobat\11.0\JavaScripts

You will need to create the JavaScripts directory.

To get to this directory on OSX:

Use the Finder's Go to Folder menu
Use the Finder’s Go to Folder menu
Go to ~/Library
Go to ~/Library

Navigate from there to Application Support/Adobe/Acrobat/11.0 (or whatever version you’re using) and create a folder named JavaScripts. Name may be case-sensitive, and don’t forget the trailing s. Copy the fix_forms.js script into the JavaScripts directory.

Lastly we need to enable menu items JavaScript execution privileges in Adobe Reader (in the Adobe Reader -> Preferences menu)

Enable Menu Items JavaScript Exectuion Privileges
Enable Menu Items JavaScript Execution Privileges

Restart Adobe Reader and you’ll be ready to fix your form!

Fix Field Appearances
Fix Field Appearances

You’ll find the script in the File -> Fix Field Appearances menu. Just run it and…

Success! A return to santiy is now possible!
Success! A return to sanity is now possible!

The last step is critical. Never EVER use Preview to edit a form again.

This entry was posted in Computers and tagged , . Bookmark the permalink.

5 Responses to How to fix PDF Form With Blank Fields

  1. Holly Moxley says:

    Thank you! Your solution and step-by-step instructions for loading the script was exactly what I was looking for. Way more helpful (your solution actually worked) than weeding through the mire of information on the Adobe site (no offense Adobe — still love you too!)

    I have already run the script on 3 documents and have been please with the results.

    THANKS!

  2. Daemon Löfman says:

    Finally someone who had a solution, have mac at home and at school i have a pc and this error really was anoying.. silly that the problem still exists in adobes program, really sad!
    but thanx for the help. made my day! thanx!

  3. Angela says:

    We are having this problem at our office. The forms are created in Acrobat 11 Pro (Windows 7), but the forms are being used and filled out by foremen at construction sites using iPads. I’ve tried the script, and it works with fixing some of the forms, but not all. But exporting the data and reimporting does fix the ones that don’t respond to the script. Is there a way to set up a script to have Acrobat 11 Pro automatically run Fix Field Appearances when opening any PDF (or is that a bad idea)? If it runs automatically, we wouldn’t miss any that we didn’t realize had missing data. Manually having to run the script means we have to know beforehand that the form has missing data. It’s problematic because some of the forms we are using are for timesheets, so sometimes some areas are deliberately empty, and sometimes not. If we don’t know a field should have data and we assume the timesheet is correct, the employee may not get credited for the time they did fill in that we are not seeing.

    Also (or alternatively), might there be a script to automate exporting the data, then reimporting, to take care of the ones that won’t respond to Fix Field Appearances?

    • stuporglue says:

      Hi Angela,

      I’m sorry, I don’t know a way to automatically run the script. I would check if there are updates for the iPad software, it’s possible (but unlikely) that Apple has fixed the issue in a software update.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current ye@r *