Question
BOA
IN
Last activity: 30 Jan 2026 8:22 EST
How to insert a image in Paragraph rule to display it in a PDF?
To Insert a image from Binary file into a paragraph rule and display it as PDF i followed below steps and it worked
Activity
Non auto generated section
Paragraph
Binary file with image
Paragraph rule has code as below with binary file pzinskey as below.
<% String ImgData=tools.getDatabase().open("RULE-FILE-BINARY WEBWB LHH_xxxxxxxxxxxx!PNG #20260129T103048.129 GMT",false).getString("pyFileSource"); %>
<img src="data:image/png;base64,<%=ImgData.trim()%>" style="object-fit:cover;display:block;" height="750" width="650" >
Non Auto gen section:
To Insert a image from Binary file into a paragraph rule and display it as PDF i followed below steps and it worked
Activity
Non auto generated section
Paragraph
Binary file with image
Paragraph rule has code as below with binary file pzinskey as below.
<% String ImgData=tools.getDatabase().open("RULE-FILE-BINARY WEBWB LHH_xxxxxxxxxxxx!PNG #20260129T103048.129 GMT",false).getString("pyFileSource"); %>
<img src="data:image/png;base64,<%=ImgData.trim()%>" style="object-fit:cover;display:block;" height="750" width="650" >
Non Auto gen section:
<pd4ml:transform
pageFormat="A4"
pageOrientation="potrait"
>
<div>
<pd4ml:page.header>
<pega:include name="DocHeaderrule" type="Rule-HTML-Paragraph"/>
</pd4ml:page.header>
<pd4ml:page.footer>
<pega:include name="DocFooter" type="Rule-HTML-Paragraph"/>
</pd4ml:page.footer>
<pega:include name="IMPEReleasePDFStyle" type="Rule-HTML-Section"/>
<pega:include name="paragraphrulenamexxxx" type= "RULE-HTML-Paragraph"/>
</div>
Activity:
method:Property-Set-Stream
Params:
Local.theHTML to hold output
Rule-HTML-Section
Autogensectionname
Call HTMLToPDF OOTB activity
</pd4ml:transform>