Question

6
Replies
364
Views
AnupamaP5564 Member since 2017 7 posts
CapGemini
Posted: 2 years ago
Last activity: 2 years 8 months ago
Closed

Images are not displaying in PDF (PD4ML generation)

Hi All,

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"));
PD4MLObject.setPageInsetsMM(new java.awt.Insets(margin, margin, margin, margin));
PD4MLObject.setPageSize(PD4constant.A4);
PD4MLObject.useTTF("/opt/fonts",true);
PD4MLObject.enableImgSplit(false);
PD4MLObject.interpolateImages(true);
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
PD4MLObject.render(new java.io.StringReader(HTMLStream), baos);
baos.close();
tools.putParamValue("PDFDocument",baos.toByteArray());
}
catch (Exception e) {
e.printStackTrace();
}
Case Management Data Integration
Moderation Team has archived post
Share this page LinkedIn