Expand my Community achievements bar.

Dynamically adding an image resource

Avatar

Level 3

I am creating a dynamic form that reads in XML. Every once in a while I will get an image in jpg form that can be displayed. Sometimes I will get a video, which obviously cannot be displayed. Instead I would like to have a jpg on hand that I can put in place of the video to show the user that this is where a video would be.

The XML looks like this:

<<images>
<video fileName="49.flv" href="" />
</images>

- <images>
<<ImageField1 xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" fileName="50.jpg" href="" xfa:contentType="image/jpg">Image Data</ImageField1>
<<images>

So whenever I encounter the <video> tag, I want to be able to grab a jpg resource image of a videocamera to put in it's place. How do I do this? Thanks in advance.
3 Replies

Avatar

Former Community Member

Can you manipulate the xml before you do the merge? If so you could place the image inside of the video tag (base64 encoded of course) and simply bind it to the image field. Otherwise you will run into issue trying to retrieve the image contents from somewhere else.

Paul

Avatar

Level 3

Yes, we can manipulate the XML, but I was hoping to be able to add a jpg resource to the XML and be able to always grab it from the same place.  I'm guessing that it isn't possible to add resources like that. We'll go ahead and a add it to the XML.

Avatar

Former Community Member

You are always safer to embed the image contents into the XML instead of retrieving it. Also acrobat will not retrieve content from another location without user intervention.

Paul