private void processImage(Phrase phrase, Picture picture, ColumnText column)
{
// TODO Auto-generated method stub
byte[] pictureData = picture.getContent();
float ls = 12.0f;
float multiline = 1.0f;
column.setLeading(ls, multiline);
pictureData = WordToPdfUtils.getMetaFileAsImage(pictureData);
if (pictureData != null) {
try {
Image pic = Image.getInstance(pictureData);
float[] scwh = scaleInlinePicture(picture);
pic.scaleAbsolute(scwh[0], scwh[1]);
phrase.add(new Chunk(pic, 0, 0, true));
column.addText(phrase);
} catch (BadElementException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
When i add phrase containing inline image to the ColumnText, the image appears to overlap on the above paragraphs in the generated pdf, how to add inline images while working with ColumnText. A link to sample pdf file generated with the issue is as below
pdf sample with inline picture issue Thank you.