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

Explorer ,
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 ..

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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 obtained with this script

field.buttonGetCaption();

 

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

 

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

65

Likes

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

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

Explorer ,
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 ..

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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 obtained with this script

field.buttonGetCaption();

 

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

 

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

66

Likes

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
Jan 21, 2020 1
Adobe Community Professional ,
Jan 21, 2020

Copy link to clipboard

Copied

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. 

 

Likes

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
Reply
Loading...
Jan 21, 2020 0