Copy link to clipboard
Copied
I am getting the message below when I open my PDF form.
The font ‘Helvetica.Bold’’ contains an invalid encoding. Some characters may not display.
I viewed the properties of every field in the form, and did find a few that used Helvetica Bold. I changed them to a different font. If I go to File > Properties > Fonts, I no longer see Helvetica Bold listed as a font used in the PDF. Yet when I close and reopen the PDF, I get the above "invalid encoding" font message.
Does the fact that I am still getting the error message mean that the document properties is wrong, and that the font still exists somewhere in the PDF? And if so, does anyone have a suggestion on how to find it?
I am using Acrobat Pro DC, 2015 release, version 215.023.2156 on a Macintosh running OS X Yosemite.
Thanks in advance for your time.
I seem to be having a conversation with myself here today. To eliminate the "invalid encoding" message that appeared every time I opened my form, I ended up creating a blank PDF, then copying and pasting my fields into the blank PDF. Once saved into the blank PDF, I could then open the form without getting the "invalid encoding" message. My form has document and page level scripts that needed to be copied over as well, too, but copying beats starting from scratch. For whatever reason, removing a
...Copy link to clipboard
Copied
I did a web search and found a script that Max Wyss wrote that will generate a list of the fields on a form, and the fonts used on those fields. To run it, you open the Acrobat javascript debugger, replace the default code that is in the console window with the code below, then highlight all of the code you just pasted, and press Enter on the numeric keypad (or type Ctrl+Return on the regular keyboard). It will then return a list of the fields on your form, and the fonts that are used on those fields like this:
the field SetDate2 uses Helvetica
the field SetDate3 uses Helvetica
the field Submit uses ArialNarrow,Bold
for (var i = 0 ; i < this.numFields ; i++) {
var mf = this.getNthFieldName(i) ;
try{
console.println("the field " + mf + " uses " + this.getField(mf).textFont) ;
} catch (e) {
console.prinln("the field " + mf + " has no text font")
}
}
Copy link to clipboard
Copied
Created the list as outlined above. None of the fields listed use Helvetica Bold. I then started from the bottom of the form and worked my way up incrementally deleting fields from the PDF, saving it, and then opening it to see if I got the error message. There was one field left on the document, and I still got the message. I removed it, and the message was gone when I opened my now blank PDF. Thinking that last field was the causing the font error message, I opened a copy of the form, deleted that field, and saved the PDF. When I reopened the form the font message came back!
Has anyone else dealt with this type of issue, and if so, how did you remove the problem font? I have tried optimizing the form, that did not help, either.
Copy link to clipboard
Copied
I seem to be having a conversation with myself here today. To eliminate the "invalid encoding" message that appeared every time I opened my form, I ended up creating a blank PDF, then copying and pasting my fields into the blank PDF. Once saved into the blank PDF, I could then open the form without getting the "invalid encoding" message. My form has document and page level scripts that needed to be copied over as well, too, but copying beats starting from scratch. For whatever reason, removing all the fields, then pasting them back into the original PDF would not resolve the problem. It seemed as though the Helvetica Bold font was embedded somewhere in the file that I could not see or access.
If anyone stumbles across this thread, and knows the cause and a fix for the "invalid encoding" error message, please post it.
Copy link to clipboard
Copied
The answer from amy1333 is much simpler. If anyone comes here later - look for that one.
Copy link to clipboard
Copied
I'm having the same problem, except for with a different font (Noteworthy-light) that I am not using in my form. I tried to use it at one point but it gave me an error so I switched to a different font. I can't get rid of this error though. I have tried creating a new blank pdf and copying all of the fields over, but the error showed up as soon as I did. There are 100+ fields, so to do them one at a time is not very efficient. Has anybody found a solution that works yet?
I also tried going to the properties of the form but the problem font does not show up in the list.
Copy link to clipboard
Copied
Hi!
I had all these problems, I tried opening it in Preview instead, saving as a PDF from there..Once I opened it in acrobat I no longer got the error message!
Copy link to clipboard
Copied
Acrobat Pro DC
I got rid of the "invalid encoding" font error another way:
The new file didn't have the error. I hope this helps someone else!
Copy link to clipboard
Copied
Amy1333 - your method worked perfectly for me. Many thanks
Copy link to clipboard
Copied
Oh my gosh, thank you SO much. Problem solved! 🙂
Copy link to clipboard
Copied
Awesome - worked perfectly!
Copy link to clipboard
Copied
am1333 - Thank you so much. Worked great!
Copy link to clipboard
Copied
WORKED like a CHARM! Thank You!
Copy link to clipboard
Copied
Unfortunately this didn't work for me. Still getting 'The font Arial, Bold, 1252 contains an invalid encoding' after trying to open the new file.