How to display an image attached to a case in the section?

I am generating PDF of my case data. I need to show images (attached in the case) in the generated PDF. How to achieve this? Pega version is 8.1.4


Keep up to date on this post and subscribe to comments

November 20, 2019 - 1:03pm


I hope the below pointers will help you to achieve your requirement.

-Do a obj-open-by-handle on the Instance of Data-Workattach-File (for example). the property pyAttachStream has the content in base64 encoded format.

- Call the Pega function Base64 decode and pass the pyAttachStream as parameter. This will return string which can be found in clipboard.

- Convert image data to html stream.

-Follow the standard steps to generate pdf from stream.


November 21, 2019 - 6:40am
Response to GeedA

Can you please elaborate on this? - Convert image data to html stream.

Do you mean to say show the decoded property value in html? and then call this stream in Property-Set-HTML?