Hello,
I would like to know if it is possible to get an image (picture) from external server to show on the form bases on the data that is populated from the web service that was built in workbench ES. Please advise.
Thanks,
Han Dao
You need to convert the image to a Basde64 encoded string and pass it along with the XML before rendering the PDF.
PDF will display dynamic Images only if they are Base64 encoded.
You can write some bean shell scripting to use Java APIs to convert the image to Base64.
Thanks
Srini
Views
Replies
Total Likes
Hi Srini,
Thanks for the quick reply. After convert the image to base63 encoded, how do I pass it along with XML in LiveCycle Designer? Can you please advise.
Thanks,
Han Dao
Views
Replies
Total Likes
If you are rendering the form from the workbench, beforeyou use the RederForm service, place a ExecuteScript service and then write code to append the Base64 encoded String to the XML tag. Basically it is a string concatenation.
"<?xml......
.
.
.
.
.
"
+ <imageData>" + Pass Your Base64 String Here + "</imageData> +
"
.
.
.
.
"
Use this XML variable in your RenderForm service..
Can this give you an idea..
Thanks
Srini
Views
Replies
Total Likes
Wow. It looks great. I will try it and let you know the results next week.
Thanks alot.
Han Dao
Views
Replies
Total Likes
Hi Srini,
I try it but I think I got confused to make it work right. Do you have a sample, can you please provide one.
Thanks again,
Han
Views
Replies
Total Likes
Here is a sample code for converting the image to Base64 encoded..At the end of the scripting, the Base64 encoded string will be assigned to a local variable. You can add this variable to the XML before the rendering.
https://acrobat.com/#d=dDMnM4dk-wg-Eo79D1fiRQ
Thanks
Srini
Views
Replies
Total Likes
Hi Srini,
Thank you for the replies. I am still confusing at the part of making it work in the form. Do you have a sample form that you can share, I would appreciate much since I could not make it work right.
Thanks again.
Han Dao
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies