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

How we can know if Image Field has Image(Value)

Community Beginner ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

Hello All,

 

I have a question regarding Image Field(Button). I have 5 image field on the  pdf and I'm sending all the 5 field to the c#, but when I'm trying to save the pdf using c#, I'm able to access the Normal field With the value but not able to fidgure out the How I can map the Image field and Value. 

Ps: I don't have any issue reading the images or fields, not able to figure it out which field relates which image?

As an exmple: I have image and I can set to Image field 5 but In my current document it's on Image Field-1. I don't want to hard code the field name. 

It should work like normal field: Doc1 Formname: test and Doc: 2form name :test

I'm not able to map it correct. 

Is there any way we can find if image field as value ?

 

 

Thanks 

Regards 

 

TOPICS
Acrobat SDK and JavaScript

Views

504

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
Community Expert ,
Aug 28, 2020 Aug 28, 2020

Copy link to clipboard

Copied

Sorry, I don't understand your question. Image field names are "hard coded" - you set the name at the time you add the field to the document. In JavaScript, you can try convert the icon from the image field to an iconStream. This will throw an exception if the icon is not valid. Something like this:

 

var im1 = this.getField("Image1_af_image");
// get the icon for image 1
var icon1 = im1.buttonGetIcon();
try {
    var iconStream1 = util.iconStreamFromIcon(icon1);
    console.println("iconStream1: " + icon1.toSource());
} 
catch (e) {
    console.println("Cannot get iconStream from icon - icon is not defined");
}

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
Community Beginner ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Thanks for your reply.

 

I'm sending all the field in arrays and calling the submit button, with the help of this I'm able to get all the field on my pdf, But If the field has image, that field is still showing Null, and In my case I have 10 image Fields, so that I'm not able to find the relation with the image, since image field is null and image is not showing any details for the field.

 

Goal: I have images on PDF and some data and it's not save, it's ruuning and once user will submit it, it will call web service, I need to put all the data in db and Images as well after that I need to create a PDF with the same data and Images.

I'm able to create the pdf with the same data but If the more than 10 image field on pdf not able to figure out any ralteion, in which field, image will go.

 

Thanks 

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
Community Expert ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Where does you get the Null?

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
Community Beginner ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

In my c# Code, All the field coming with the value but Images fields coming as null.

 

I'm using ItextSharp to extarct fields on the pdf with images

 

 

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
Community Expert ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Can be a problem of ItextSharp.

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
Community Beginner ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

 

Is there any workaround available for this issue?

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
Community Expert ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

LATEST

Try a forum for ItextSharp.

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