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

How to get the "Icon Label's Name" of the Icon used in the "Image Insertion Field" ??

Guest
Jan 21, 2020 Jan 21, 2020

Copy link to clipboard

Copied

We have created several image insertion fields in the form.

In this field can insert own "Icon".
And it can set the "Label Name".
These can be displayed in the image insertion field.

 

I want to manipulate this "Icon Label Name" with Javascript.

 

Please be attention. It's not "Field Name".

This means that this field has a "Field Name", "Inserted Icon", and "Inserted Icon's Label Name".
What I want to manipulate is "Inserted Icon's Label Name".

 

I don't know how to do this.
Nowhere can I find a way.

 

"Field name" can be obtained in the following ways.
---
var Peace01 = this.getField("Peace_01");
var Peace01label = Peace01.name;
event.value = Peace01label;
---

 

I tried the following, thinking that maybe I should rewrite the second line, but all returned an error.

 

var Peace01label = Peace01.label;
var Peace01label = Peace01.labelName;
var Peace01label = Peace01.note;
var Peace01label = Peace01.tag;
var Peace01label = Peace01.id;
var Peace01label = Peace01.caption; so on...

 

I can't find any reference materials anywhere, so I tried all the words that came up....

 

I want to also rewrite as well as get, but I do not know at all.

 

Please help me ..

TOPICS
Acrobat SDK and JavaScript

Views

419

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Jan 21, 2020 Jan 21, 2020

You would gain a lot by reading the Acobat JavaScript Refence, rather then guessing at PDF object properties. 

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJavaScript_SectionPage%2FJavaScript_SectionPage.htm

 

You can also learn a great deal about scripting Acrobat and PDFs here:

https://www.pdfscripting.com/public/main.cfm

 

I believe that what you are calling an "Image insertion field" is really a button field.

The label for a button field can be obt

...

Votes

Translate

Translate
Community Expert ,
Jan 21, 2020 Jan 21, 2020

Copy link to clipboard

Copied

LATEST

You would gain a lot by reading the Acobat JavaScript Refence, rather then guessing at PDF object properties. 

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJavaScript_...

 

You can also learn a great deal about scripting Acrobat and PDFs here:

https://www.pdfscripting.com/public/main.cfm

 

I believe that what you are calling an "Image insertion field" is really a button field.

The label for a button field can be obtained with this script

field.buttonGetCaption();

 

where "field" is the field object. Look it up in the reference. 

 

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

Votes

Translate

Translate

Report

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