Expand my Community achievements bar.

Unable to load image dynamically in an XDP file:

Avatar

Former Community Member

We are unable to load images dynamically in livecycle designer when a dynamic form (xdp) is rendered.

Steps :

a) Using Adobe liveCycle designer, a new Blank form was created.

b) An image field control(ImageField1) and an image control(Image1) was added to the blank form:

c) The following lines were added to the Form ready event: ( form1.page1::ready:form - (JavaScript, client))

Image1.value.image.href="abc.jpg";

ImageField1.value.image.href="abc.jpg";

The images are not being loaded when the pdf preview is shown in the designer.

What we are trying to do is to have a bunch of images (over 100's and cannot be embedded) and load an image dynamically based on the data value from the xml source.

example input data :

<ImageName>abc<ImageName>

On the form  - display image abc.

(It doesn't work even if the absolute or relate paths are given: "file:\\abc.jpg" or "c:\abc.jpg")

Any inputs to show the images would be appreciated...

4 Replies

Avatar

Level 10

You need to convert your images into Base64Encoded format and then pass the encoded string as part of your XML while rendering. Bind the XML tag to the image field. So when you render the form, ImageField will decode the string and display the image properly on the screen.

PDFs will accept only Base64Encoding for images at runtime..

Thanks

Srini

Avatar

Former Community Member

Srini,

Thanks for the prompt response.

But this means that the Adobe repository will not store the images. The system generating the input XML will have to store the images, convert to base64encoded and pass it to livecycle server so that Adobe forms/output service can data bind this to the image field. 

Is there no other way?

regards

vipin

Avatar

Level 1

Hi,

Perhaps this (http://partners.adobe.com/public/developer/en/livecycle/designer/DisplayingImages.zip) may help

Regards,

Hemen

Avatar

Former Community Member

Hemen,

Thanks for your response. your solution is perfect if we have only a few images,

In our case we have a couple 100's of images, we would not be able to load all of them into the pdf.

Based on the data in the input xml, we need to load the image in the pdf and send it across to the client.

Regards