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

Javascript setItems() for combobox creates character set problem

Explorer ,
Nov 03, 2016 Nov 03, 2016

Hi,

Following adobes own Javascript for Acrobat API reference i tried to add three items to an existing combobox on an existing pdf form generated in Adobe Indesign.

I'm using this script:

function addComboboxItems()

{

var l = this.getField("combo_burgerlijksestaat");

  l.setItems(["One", "Two", "Three"]);

}

addComboboxItems()

It works when triggered, but i'm experiencing a character set problem  in my document which i can't seem to figure out.

In the document properties, i find this in the Fonts Section:

Any help is much appreciated!

Grtz Kristof

TOPICS
PDF forms
3.7K
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
1 ACCEPTED SOLUTION
Community Expert ,
Nov 04, 2016 Nov 04, 2016

What font are you using for this field? Does it also happen if you use something like Helvetica or Times-Roman?

View solution in original post

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 04, 2016 Nov 04, 2016

What font are you using for this field? Does it also happen if you use something like Helvetica or Times-Roman?

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 04, 2016 Nov 04, 2016

Also, what application are you using to write your code?

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
Explorer ,
Nov 06, 2016 Nov 06, 2016
LATEST

The problem was indeed the font that was assigned to the combobox. For some reason, you' can't specify the font in indesign, and adobe acrobat doesn't use an already embedded font. It creates an extra set, for which it only seems to embed the characters used in the item list in indesign.

After changing this element's font to an already embedded one, after pdf-generation, everything works as expected.

We're using eclipse and java-program to open and change some pdf content on the back-end.

Thanks a bunch try67!

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