Copy link to clipboard
Copied
Hi.
I have a PDF where I have added form fields in Acrobat Pro DC and I've set the font in the form fields settings to be Arial.
The form fields are being populated in a Java program, but for some reason the program throws an error when the font is Arial, but it works fine when the font is for example Helvetica.
I suspect it has something to do with the font encoding.
Hope someone can help.
I'm using a Macbook Pro
Copy link to clipboard
Copied
That's really something for the author of the Java program. Certainly, there are many different ways a font might appear in a PDF, and different encodings is all part of it.
Copy link to clipboard
Copied
Ok. But the error seems to only occur, when the text includes special characters for example "ð".
But Helvetica handles the special characters just fine.
When choosing a font for the form field, the list of fonts seems to be grouped by horizontal lines (see attached screenshot). Are they grouped in types of encodings or something? I've tried all the fonts in the top group (where Helvetica is) and they all work fine. I haven't tried all the other ones, but all the other ones that I've tried outside of that group, don't work.
When using Arial (and many of the other ones), the error in my program says:
"U+00F0 is not available in this font's encoding: MacRomanEncoding with differences".
"U+00F0" is the letter "ð". What type of encoding do the fonts in the top group have (e.g. Helvetica) and is there any way to use a different encoding with Arial to make it work?
Copy link to clipboard
Copied
Is the font Arial full embedded?
Copy link to clipboard
Copied
I'm not sure. How can I check/do that?
Copy link to clipboard
Copied
If the form is edited in Acrobat to set the font, then (if it is not Type 1, or protected) it is fully embedded.
So if this is the case then there is no issue with the font.
The likely culprit is poor font handling in the Java Program. This is supported by the fact that Helvetica works. Helvetica is a Type 1 font and does not require embedding. It's built into Acrobat.
So you have two solutions:
1) Fix the Java Program
2) Stick to Type 1 fonts.
Copy link to clipboard
Copied
Ok. The course of action was, that I received a Word document, which I saved as a PDF. Then I added form fields to that PDF in Acrobat Pro DC and selected Arial as the font for each of the form fields (see screenshot above) in Text Field Properties > Appearance.
But when filling out the form fields in Acrobat (not in the Java program) with no special characters, the Document Properties > Fonts looks like this:
But when filling it out with some special characters, it looks like this:
Copy link to clipboard
Copied
Never use Arial. It looks OK but it is exactly the same as Helvetica (for this purpose) and just adds hugely to the file size. That will at least make THIS problem go away -- but what do the makers of the Java app say?
Copy link to clipboard
Copied
A couple of points.
1) Form field Fonts are stored in a special location in the PDF and do not appear on this font listing. So the listing is irrelevant.
2) We've already established that is doesn't matter if the form field font is correctly stored in the PDF. The problem is the Java program.
Copy link to clipboard
Copied
My colleagues have made the Java program (or at least part of it) but it may be some component, that they're not able to change.
So assuming that changing the Java program is not an option, then using Type 1 fonts, such as Helvetica, seems to be the only way to make it work, right?
And Type 1 fonts work, because they're built into Acrobat and do not require embedding, correct?
How many Type 1 fonts are built into Acrobat? Is it the 14 fonts in that top group of the very first screenshot I posted?
Copy link to clipboard
Copied
"my colleagues have made the Java program ...then using Type 1 fonts, such as Helvetica, seems to be the only way to make it work, right?" How can we POSSIBLY know what your program does, how it does it, why it works, and what its limitations are? Sorry, you ask us to answer the impossible.
About fonts: the base 14 fonts are special. They are as listed in your screen shot (except that for some reason Adobe Pi replaces Zapf Dingbats, the real font name). They are special not because they are type 1 fonts, but because the font file does not need to be embedded. They can still be re-encoded, but usually will not be.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Of course you can't know how the program works. I'm just looking for some hail-mary guesses based on you guys' knowledge of Acrobat, PDFs, fonts and so on. My knowledge is evidently very limited in those areas.
One more question...there's no way to add other fonts to that list of "special" fonts or to make other fonts work/behave in the same way that those do? For example so Arial will behave the same way that Helvetica does in this case?
Copy link to clipboard
Copied
You don't seem to want to take even my simplest advice: don't use Arial. Why not?
(You cannot add to the list. These 14 fonts are listed in the official rules for PDF, and the list is included in every PDF viewer on perhaps billions of computers).
Copy link to clipboard
Copied
Ok. The reason is, that Arial is used in the design specifications. But we'll just have to pick another font or find some other solution with the program.
Thanks for all your input.
Copy link to clipboard
Copied
Hi Thom,
Can you give any guidance as to where form field fonts are stored in the PDF? Having a similar problem with a font used for a Salish workbook that has lots of special characters and am seeking guidance. Thank you!
Copy link to clipboard
Copied
Knowing where the form field fonts are stored won't help because you can't do anything with them.
In Acrobat, when a font is selected for a form field, that font is fully embed into the PDF, unless there is some font feature that prevents embedding. For example, the font could be licensed in such a way that it can't be embedded. But there are other reasons fonts don't embed as well. I'd suggest you find out as much as you can about the Salish font.
Copy link to clipboard
Copied
Forgot to attach the screenshot erlier, so here it is.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now