Question

1
Replies
101
Views
Piyush Member since 2015 41 posts
Evoke Technologies
Posted: 10 months ago
Last activity: 9 months 2 weeks ago

Show Encoded value as an image on UI

I have a requirement to print the attached images as a consolidated pdf. So first I am trying to show the attached image in a section, then i will use the section in an html to generate markup and then generate the pdf using HTMLtoPDF and then View.

However I am not able to display the image on a section. I am fetching the pyAttachStream and saving it on a property on pyWorkpage (just to avoid loop temporarily). As per THIS article, I am using the below code in a non-autogenerated section

<img src="data:image/jpg;base64,"+<%=tools.findPage("pyWorkPage").getProperty("FileSource").getStringValue()%> alt="imageName" />

however it is not displaying the image.

Another solution was given on THIS article. However there could be many attached image files and this solution will not work in that scenerio.

Pega Version : 8.1.4

Low-Code App Development User Interface
Share this page LinkedIn