cancel
Showing results for 
Search instead for 
Did you mean: 

Image is not displayed

Former Member
0 Kudos

Hi experts.

I have to integrate a jpeg image into my Interactive Form. So I exactly followed the instructions on page 17 ni the document "Interactive Forms Integration into Web Dynpro for Java".

- I used an "image field"

- I set the binding to "None" and the URL to "$record.ImageUrl"

- I added the following FormCalc script: this.value.image.href = xfa.resolvenode(this.value.image.href).value;

- In my node that is the data source, I provided an attribute "ImageUrl" of type String

That didn't work. After several trial and error runs, I just entered a valid URL of an image and tried the image field with that static URL. No image was shown. Is there an error on my side? Or what could be wrong?

I use Netweaver 7.00.15 and Adobe Reader 9.

Thanks in advance,

Karsten

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

after u place image element on the form select "embed form data " option for it.

Regards

Jay

Former Member
0 Kudos

Hi.

I tried both, with and without the option "embed" without any success.

Regards, Karsten

Former Member
0 Kudos

Would someone be able to provide me with a working sample application?

Just one Form containing an image field where the URL for the image is provided from the web dynpro context would be fine.

Send the app to karsten.geiseler(at)gslr.de

Thanks in advance!

Former Member
0 Kudos

Hi,

Try this in Initialise ,

$.value.#image.href = xfa.record.Image1

Image1- node attribute where u can pass the url value.

Remove the value in URL field and leave it blank.

or you can try this

this.value.image.href = xfa.record.Image1;

Image.access = "nonInteractive";

Image1- node attribute where u can pass the url value.

URL field -$record.Header.ImageLogo

you can check another thing is the attbriute that has image URL value should be inside the parent node as per above script.If you are having inside any child node then u have to modify the script a sbelow

$.value.#image.href = xfa.record.childnodename.Image1

Hope this helps,

Regards,

Siva

Former Member
0 Kudos

Hi KG

For the same issue i spend correct 45 days got resolved i will provide solution for you alos it will work

Step1 : In the View of method wdDoModifyView make DynamicPDF as false use the below code.

Note :change accrdonng to your form name.

IWDInteractiveForm iForm1 = (IWDInteractiveForm) view.getElement("InteractiveForm");

iForm1.setDynamicPDF(false);

Step2 : Java Script Code for Image Element in the form

this.value.image.href = xfa.resolveNode(this.value.image.href).value;

other propertie

URL: $record.PhotoUrl

Binding: None

100% will resove your issue.

Rgds

-SS

Former Member
0 Kudos

Thanks for your answers.

In the meantime I found out where my problem was:

The images I referred to were public, but they needed authentication. So the pdf failed to load the images, unfortunately without any notification about the reason. For security reasons it was not possible for me to write a servlet that serves the images anonymously, so I get the image in my Web Dynpro code, encode the byte array with the engine's BASE64Encoder and put it to a context attribute of type String. Now you simply have to bind an image field's value to the context attribute and your done.

PDF size isn't to bad either, so I'm pretty happy with that solution.

Regards, Karsten

Former Member
0 Kudos

Hi Karsten,

My requirement is to call the images dynamically on PDF based on certain condition.

Unfortunately we are now using Acrobat 8.1.1. Please refer following thread.

http://kb2.adobe.com/cps/405/kb405270.html

In Acrobat 8.*, we have to use some different method for dynamically calling the images. Are you aware of it. If yes, please help.

Regards,

Gary

mmmonteverde
Employee
Employee
0 Kudos

Hi Gary,

Was you able to solve this? I need to create a PDF with some images dynamically. How did you achieve this?

Thanks a lot,

María Margarita