I don’t know if you guys are hearing this as well, but I’ve started running into problems where Acrobat forms (AcroForms, not XFA) are being filled out by Mac OS X and sent back to folks with Acrobat and the fields appear blank until you click into them.
UPDATED 10/05/2011 – Now works with Acrobat X, Version 10.1.1 Fixed the error message popping up for each field.
UPDATED 1/28/2011 – The script has been updated to work with Acrobat X. Because the “Document” menu no longer exists, I move the script to load under the “Edit” menu.
UPDATED 3/18/2010 – There’s been some confusion about when to use this tool so I added some code to test if Mac Preview.app was the last application to save the PDF file. If not, the menu item will be greyed out.
UPDATED 3/17/2010 – I added some additional code to not add the menu item if the script is running in the Adobe Reader and to be greyed out if there are no form fields on the document.
UPDATED 2/18/2010 – I fixed the “An internal error occurred” bug. Give it another shot if you’ve had problems.
It seems a little strange but there’s a good explanation. In PDF files, the value of a field and it’s appearance are two different things. This lets you do some pretty cool tricks with date strings and other types of formatting but can cause problems with non-conforming viewers.
In this case, Mac OSX’s Preview.app isn’t writing any appearance into the fields nor it is setting the “needs appearance” flag. So when Acrobat displays the file, the fields are blank until you click into the field displaying the field value. The “needs appearance” flag is intended to tell the application rendering the PDF file that the data in a field has been changed by some other tool that didn’t also generate an appearance for the field, like a server script or something like that.
One way to correct the form is to take some action which forces Acrobat to regenerate the appearances without actually changing the values or the appearance. Flipping the multiline option seems to work well. So I wrote up a little script which will iterate over the fields and switch on and off the multiline value.
When the multiline option is toggled, Acrobat thinks it needs to re-layout the content of that field and regenerates the appearance.
Many thanks to Leonard Rosenthol for uncovering this issue for me, supplying the functional part of the script and writing most of the text above.
Installing the Script
1. Quit Acrobat if it is already running
2. Download the script and then copy the ADBE_JFG_fixFields.js file into the following location:
a. WIN XP
C:\Documents and Settings\USERNAME\Application Data\Adobe\Acrobat \9.0\JavaScripts
b. WIN VISTA
C:\Users\USERNAME\AppData\Roaming\Adobe\Acrobat\9.0\JavaScripts
c. MAC OSX
/Users/YOURUSER/Library/Application Support/Adobe/Acrobat/9.0_x86/JavaScripts
3. Restart Acrobat
4. Look at the bottom of the “Edit” menu for “Fix Field Appearances”.


I have tried twice to get this java script to work and only get the prompt “An internal error occurred” when I run the Fix Field Appearances. Any suggestions?
Hi Jason,
I have used the script before and know it works in Acrobat Pro 9, which I have at home. However, at work, I have Acrobat X Standard and my operating system is Windows XP Pro(version 2002 w/service pack 3)and I can’t get the script to work. The fix field button/tab is not showing up. We use fillable pdf forms that windows users can not view the data in a field, if the form was completed by a MAC user. Should this script work with Acrobat X Standard or will it only work with Acrobat Professional versions?
Thank you,
Michelle
I just fixed it. I had some debugging code in there…. very embarrassing.
What is the path for Acrobat 10? On my computer I don’t have a JavaScripts folder.
Take a look at this article. It discusses the new file locations.
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
Hi – thanks a million for this script … but it is causing an internal error when I run ‘fix field appearances’ under dox menu in Pro 9.3 on XP. Have restarted to no avail. Suggestions?
I am having this exact issue, but I am creating the forms in Acrobat 8, not 9. Will this work in 8? If so, where would I save the ADBE_JFG_fixFields.js file?
thankyou
Sorry – I should have had the code test to see if the field was of type “text” before trying to set it to “multiline”. I fixed it. Download the update from the same link above.
It should work in 8 though I haven’t tested it. Just replace the number 9 in the paths with the number 8 and that should put you in the right place.
Thank you, now I don’t have to beat my head against the keyboard anymore.
I’m still new to Acrobat and am using the forms in several ways. The fix above seemed to work when I want to read forms completed by Mac users and sent to me. However, is this also a fix for creating forms to begin with? In other words, is there a way to set up the form so that I can always read those filled in by Mac users or will I always need to run “Fix Field Appearances”? I only ask because I pulled up a blank form and clicked “Fix Field Appearances” and received an internal error. Thanks!
I’ve modified the script so that the menu item is only available if there are form fields and if Mac Preview was the last application to save the file. I hope that helps.
For Acrobat 8 the path is:
~/Library/Acrobat User Data/8.0_x86/JavaScripts/
I am using LiveCycle to create the forms which come back to two different e-mail addresses.
Is it the same solution which will require implementing on the two machines receiving the replies?
Mac OSX Preview can’t deal with LiveCycle forms. You won’t need the script for those type of forms.
Thanks so much for creating this fix! Works great!
So glad I found this post, thank you. But we also have users with just Adobe Reader – anything we can do for them? Thanks, Tobias
Good question.
Sorry – but No – The script requires editing of the PDF file that Reader isn’t able to do.
J-
Thanks so much for this. Saved my tax forms for me!
This works great. Can I assume this will work with Acrobat Standard?
It should.
So… Is this a bug with Preview or Acrobat? Are there bug reports filed with either Apple or Adobe for it?
It’s a bug with Preview. My understanding is that Apple has been made aware but I have no further insight.
Hi Joel,
I have looked at this in the past (http://forums.adobe.com/message/2594572#2594572) and (http://forums.adobe.com/message/2864468#2864468).
In the latest attempt I was trying to test the application viewer using document level script and it showed up that Preview wasn’t firing the document level script. So I added a button with a mouseUp script to force a refresh of the app viewer, but that didn’t work either.
So I added a simple calculation that multiples two fields and that didn’t work. Also the currency formatting of the price and total fields was lost.
Most forms will have some level of formatting and script and neither of these will work in Preview.
It just seems to be that Preview is broken to such a serious level that it should not be used at all. Where we have a form that is likely to be used by a person with a Mac we are considering putting in a static warning, since an app viewer check doesn’t seem to work.
Thanks for the post.
Niall
OR you could just export the form data as an FDF file, then reimport it back into the original PDF. No script required…
True. Actually – anything that forces Acrobat to redraw the field “appearances” will do the trick.
Inspired by this blog posting, I’ve expanded on this script and provided a few more details as this problem is becoming more prevalent. See: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html
So I downloaded the script, copied and pasted into the correct location for XP– rebooted the computer; but the “Fix Field Appearances” isn’t showing up…. now what?
I just updated the script to load into Acrobat X. Download the new one and replace your old file.
I’m running Acrobat 9 in Windows 7 and a colleague of mine has been annotating my blueprint pdfs in mac preview. When he sends them back to me I am unable to see his comments. I had hoped this javascript would fix the problem but when I open his annotated pdfs the Fix Field Appearances is grayed out, I’m assuming because the annotations are not form fields.
Any advice?
thanks
You are correct – comments are not form fields. I’m afraid I can’t help you with the comment problem though. Preview isn’t exactly the best PDF tool out there
Amazing – thanks so much!
Thanks for the script. I note that it requires clicking Okay for each form field individually. In a future update, could an option be included to “Fix All”?
It shouldn’t be doing that. Can you send me the form and tell me what version of Acrobat you’re using?
J-
AMAZING script, however I’m having the same issue. I have about 25 fields on my form (a mix of text fields, check boxes & radio buttons). It asked me to ok about half of them. I’m using 9.4.1
I’m having the same problem. Warning: JavaScript Window pops up with a red X and the name of the field. I have to click OK for each field.
Is there a way to fix this at document creation time instead of upon receipt of the filled-in form?
Does this fix work with Windows 7 too? Should I just follow the same instructions as Windows XP?
Should work but the file location may be a little different.
Hi,
Thank you very much for posting the fix. I have tried it on my W-XP machine with A Reader 9 and it worked great.
I am not sure what I have done wrong the second time on machine with W7. Installed as directed on W7 running A Reader 10 and Acrobat 9 pro. After reopening the PDF-form it gives me Java error message for every field, and I have to click on every single one again. After first try I have deleted the whole C:\Users\USERNAME\AppData\Roaming\Adobe\Acrobat file but this did not help.
Could it be that some Adobe programs are still running on the background even tho. I have closed the PDF it self?
Any suggestion will be appreciated.
Thanks in advance
Pet.
Is this able to be used in reader? If so, what part do I remove from the script. Our customers service does not all have professional.
No – Reader cannot modify a PDF file and doesn’t have the necessary APIs.
Joel. I am running Acrobat Pro X and Mac OSX Preview, Lion. Will your script still work? The problem outlined persists with my pdf forms. Presumably I need Java installed under Lion?
It should still work
HELP… acrobat won’t load the .js file. Well, it loaded it once. I then edited the file to comment out the app.alert() calls & now it won’t load. Extendscript toolkit thinks the syntax is still fine. What’s up?
Thanks
Eric
No clue – I’d need to see the edited script.
all of this is Greek to me! I just bought a MacBook Pro computer and I have spent two days trying to fill in a pdf form and have had nothing but trouble.
I am regretting purchasing this “top of the line” computer that now I cannot even use.
The two problems I had were when I would type in the field, as soon as my paragraph went from line one to any other multiple lines, when I clicked out of the field box, it put lines 2, 3, and any other lines of type, on top of line 1, thereby making it so that nothing could be read.
I went to Best Buy today and stood in line for 2 hours for a Mac specialist. He seemed baffled by this. Now my problem is that when I type in one narrative field, whatever I type in the first field is automatically copying in every other field on the same page. Mac specialist has no answer for this! Please help!
Were you using the Adobe Reader or Preview.app to fill in the form? Also, I’d really need to see the PDF file in question.
I’m using Acrobat X Standard in Windows XP Pro and the script is not working. Will the script only work in Acrobat Pro versions?
Thank you,
Michelle
I just fixed it. I had some debugging code in there…. very embarrassing.
J-
Thanks heaps. The script works with Arobat 8 Professional as well.
Great – thanks for the confirmation.
Thanks, Joel, for the script!
Works very well in Acrobat X.
best regards,
MAJ
I feel silly, but my path for Acrobat (9.something) goes:
/Users/YOURUSER/Library/Application Support/Adobe/Acrobat/ and then a few .xml files. I tried dropping it in this folder but to no avail.
Where shall I stick the thing?
/Users/YOURUSER/Library/Application Support/Adobe/Acrobat/10.0/JavaScripts
If you’re on version 9 then use 9.0 in the penultimate folder
J-
Joel,
Hello. I also don’t have this JavaScripts folder in my path for Adobe 10.0. I really would like to use this script. I have a 21 page form with several hours of data in it that was created in Preview, but can’t see it in Adobe.
Here is my path: /Users/YOURUSER/Library/Application Support/Adobe/Acrobat/10.0
Thanks,
Joe
Just create a JavaScripts folder in that directory and you should be good to go.
Ah, so I should make the 9.0 folder and JavaScripts folders myself? They’re not currently there.
Thanks so much for this script! Works perfectly in Acrobat X for Mac. You’ve really saved me a lot of frustration with this workaround.
Thanks so much for this- worked like a charm!
I installed the javascript and restarted, and the “Fix Field Appearances” menu item appears, but it is grayed out and not allowing me to select it. I am using Adobe Professional 9.4.6 and I am on Mac OS 10.6.8. Thanks in advance for the advice!
The script only becomes available if there are fields on the current document and the document creator metadata says it was created on a Mac. It won’t run on just any file.
I love you man!!!!!! I spent a half a day filling in a tax form and thought it was lost. Thank you again.
I have been using this JavaScript “Fix Field Appearances” with Acrobat Pro 10.1.1 for some time. However, it is no longer working. It doesn’t even show the option on the Edit menu anymore. Did something change with a recent update? Is there a new fix for this? Please help.
Are you still around Joel? Any help on this would be much appreciated.
Thanks,
Greg
Joel has moved on but you can reach him at http://blog.practicalpdf.com
You probably need to move the .js file to a different folder. See the article below.
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
The javascript was working just fine with my Acrobat X version until just recently. It no longer shows the “Fix Field Appearances” from the menu. Did something change with an update from Adobe?
Thanks,
Greg
The location of the JavaScript folder has moved.
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
Under OS X Lion running Adobe Acrobat 10.1.1, there is no JavaScripts folder.
The script works just fine if the user creates a new folder named “JavaScripts” under
/Users/YOURUSER/Library/Application Support/Adobe/Acrobat/10.0/
DO NOT put the script in the …/Adobe/Acrobat/10.0/JSCache folder as it will not work.
Joel,
Tried to help a client with this problem and having a problem activating the script within Acrobat 10.1.2.45 on XP and the menu item isn’t showing. It works in every other instance we have tried. Any help?
Thanks Joel
Adam
We haven’t tested the newest version on XP, I’ve no idea if it works at all.
thanks, worked like a charm
Hi everyone,
I have another problem, I don’t even have a folder called “acrobat” in the Adobe folder. I only have Adobe PDf in which I have an empty ‘settings’ folder. I can’t find anything related to javascript. Can anyone help me?
Just to echo what the others said – thx for posting this. Running Adobe 9.0 on a Mac, and it worked great.
Thanks for posting this. I’m having a similar issue and running out of options. I’m trying to get a PDF form created on a Mac with Acrobat 10 X to submit to an email address when the submit form button is clicked. All the other buttons seem to work although the formatting doesn’t look as good. This is the most important button ont he whole form! I’m tried creating a standard button with a menu item and also the submit form option. Nothing seems to work. It works fine on adobe reader, but I need it to work in preview.
I really hope you can help. I’m running into a deadline.
Thanks!
It’s not going to work in Preview. Preview isn’t a full implementation of PDF Forms.
I downloaded and installed the script you created and it didn’t help.
I was able to download and save the file in the correct spot, however “Fix Field Appearances” does not show up in my Edit menu. I have looked around Adobe and it has not shown up anywhere else either. I have Windows 7 and Acrobat X Pro. Any suggestions?
The folder location has moved – take a look at this article for the new location
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
What is the path for Acrobat 10? On my computer I don’t have a JavaScripts folder. I am running XP.
Take a look at this article
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
Script works perfectly running Vista. Any update available for Win 7? Thanks.
I noticed that you have removed my previous posts. Does this mean that you are no longer providing the updated fixes for the Field Appearances? If so, do you know of anyone that is? We really would like to make the latest version of Acrobat work.
Thanks,
Greg
The location of the JavaScript folder has moved, see the article below for the new locations.
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
Can you use the script for Reader?
And where do you save the script on a Windows 7?
Thanks
No – Reader cannot modify the properties of form fields.
You probably have this working already, but for others…
For Windows 7, the script goes in C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Javascripts or appropriately named folder for your version of Acrobat.
Some W7 Pro machines on a domain will have the path here:
C:\Users\Username.domain\AppData\Roaming\Adobe\Acrobat\9.0\JavaScripts
Thanks for the fix/script. This was frustrating my staff to no end.
Hi there,
We installed this script on OS X, Acrobat X, and the menu item is there, but it is unelectable (grayed out). Any ideas why?
There may be no form fields on the document you are viewing.
I have W7 and Acrobat 10. I followed instuctions to download script to C:\Users\USERNAME\AppData\Roaming\Adobe\Acrobat\10.0\JavaScripts, but it’s not showing up in the Edit menu.
I have installed the script as instructed and the “Fix Field Appearances” doesn’t appear anywhere in the Edit menu or any other menu for that matter. I am running Adobe Reader X 10.1.3. I am assuming this Java Script works for this version?
The location of the folder has changed. See the article below.
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
Works like a charm! Except one issue I’m having is that the text (in the case of text being larger than the text field) is being cut off and not shrinking to fit like it normally would. Any way to prevent or change that?
The script doesn’t modify that property, I don’t think it can be fixed via the script, you’d need to modify the property via Acrobat.
Script works great showing text fields, thanks for doing this. In my PDF (Adobe X, Vista) I use pull downs. I can see the information in the pull downs before and after running the script, when printing the fields are blank after running the script.
I also have a field that calculates the age form a given DOB that also has stops working.
Joel is no longer with Adobe and this script is no longer being maintained. It is editable though, you may be able to get a developer to help you.
Pull down not printing update:
If I reselect in the pull down, it will print.
I’m running Acrobat X Pro on Win 7. The file structure under …Roaming/Adobe/Acrobat/10.0 does not have a scripts folder. There’s a JSCache, but copying the file into that did not seem to work. Folders under 10.0 are Collab, Forms, JSCache, Preferences, Redaction, Security and Stamps.
Thanks for any suggestionn!
John
Take a look at this article for new file locations
http://blogs.adobe.com/pdfdevjunkie/2011/09/javascript-changes-for-acrobat-x-and-reader-x-version-10-1-1.html
I have windows 7 and Acrobat Pro – need the fix for this system setup
THANK YOU!!!!
The content is still hidden on acrobat X and acrobat pro. Looks fine in preview. I
have posted a question on this bug in the Adobe acrobat forms forums.
http://forums.adobe.com/message/4607131#4607131
I am a teacher, not a techie. I am a Mac user and have no idea where to locate /Users/YOURUSER/Library/Application Support/Adobe/Acrobat/9.0_x86/JavaScripts
Please provide specific instructions on how to find this location and where/how to paste the link.
THANKS!
Follow the link below for a good article of finding these folders based on your OS version.
http://osxdaily.com/2011/07/04/show-library-directory-in-mac-os-x-lion/
I’m having the same problem of receiving forms where the data in forms only displays when the clicked on and does not print. I don’t know where to put that script in 10.1.4. Tried different folders but the fix does not show up.
The article below describes the correct folder path
http://helpx.adobe.com/acrobat/kb/user-javascript-changes-10-1.html