Question

1
Replies
179
Views
Piyush Kumar (Piyush)
Evoke Technologies
Technical Lead
Evoke Technologies
IN
Piyush Member since 2015 44 posts
Evoke Technologies
Posted: November 21, 2019
Last activity: December 4, 2019
Posted: 21 Nov 2019 8:36 EST
Last activity: 4 Dec 2019 4:36 EST
Closed

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 Experience
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.