Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Form field font encoding

New Here ,
May 05, 2020 May 05, 2020

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

TOPICS
PDF forms
4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 05, 2020 May 05, 2020

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2020 May 05, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2020 May 05, 2020

Is the font Arial full embedded?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2020 May 05, 2020

I'm not sure. How can I check/do that?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2020 May 05, 2020

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. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2020 May 05, 2020

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:

Screen Shot 2020-05-05 at 16.13.00.png

 

But when filling it out with some special characters, it looks like this:
Screen Shot 2020-05-05 at 16.12.21.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 05, 2020 May 05, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2020 May 05, 2020

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. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2020 May 06, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 06, 2020 May 06, 2020

"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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2020 May 06, 2020
No mandar más correos por favor gracias
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2020 May 06, 2020

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 06, 2020 May 06, 2020

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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2020 May 06, 2020

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2024 Nov 04, 2024

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!

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2024 Nov 05, 2024
LATEST

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.  

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 05, 2020 May 05, 2020

Forgot to attach the screenshot erlier, so here it is. Screen Shot 2020-05-05 at 15.09.56.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines