Inserting base64 images from data source
Joined: 08 Dec 2011
Topic: Inserting base64 images from data source
Posted: 09 Mar 2012 at 10:19am
Q: My data source contains base64 encoded images that I want to display in my template dynamically. How can use these strings to display the images appropriately?
A: This can simply be achieved by selecting the Insert Tab and then selecting Image. You can then select the "Embed" checkbox, and select the "..." expand button to browse to our "dynamic value from input XML".
Because the generic value of this src attribute is, "data:MIMETYPE,BASE64BLOB", we will need to use the "concatenate" function available in the Edit Expression dialog (unless the data syntax is already a part of your data source string). To successfully complete this, use the following steps in the Edit Expression dialog.
1. In the Working Objects window, select functions.
2. In the Function Types window, select string.
3. In the String window, double click "concat()" (this will add the function to the expression above).
4. Within the parenthesis, you can add your appropriate arguments such as:
concat('data:image/jpeg,',SOME_XPATH) where SOME_XPATH will require you to browse the XML data to select your desired source.
Edited by justinw - 09 Mar 2012 at 1:00pm
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum