Images are not displaying in PDF (PD4ML generation)
I have a requirement to generate PDF by using correspondence rule. That correspondence rule having images which are located in"Webwb/". And also the images having visibility conditions (So, for this i created each JPG image as a separate correspondence rule and included those into the main correspondence rule with when rules).
I used customized PD4ML to generate PDF . When i go with below code, I am getting below issue. Please help on this.
*** The images are not at all displaying in generated pdf.
org.zefer.pd4ml.PD4ML PD4MLObject = new org.zefer.pd4ml.PD4ML();
org.zefer.pd4ml.PD4Constants PD4constant = new org.zefer.pd4ml.PD4Constants();
org.zefer.pd4ml.PD4PageMark footer = new org.zefer.pd4ml.PD4PageMark();
int margin = Integer.parseInt(tools.getParamValue("Margin"));
An enhancement request is raised with Pega for the same when a similar requirement was posted on PSC earlier. You can track the development of this feature using the feedback id(FDBK-19717) through your account executive.
How about using OOTB HTMLTOPDF activity? As of now, it doesn't take margin as parameter thus there is the drawback. And this enhancement request will consider that aspect as well.
In one of the post, a Pega developer was using <img alt="" src="binary-file-location"/> and was able to generate the margin too.
Hope it answers your query, please mark it answered if it does.
But, i can't go for OOTB HTMLTOPDF activity for PDF generation. Because we have a requirement to generate "different footers across different pages of PDF". We are able to achieve this through PD4ML custom java code which is not able to get using OOTB HTMLTOPDF activity. So, could you please provide solution for this in PD4ML custom java code only.