Hi Team,
I am getting image as bytes from database and that bytes may be of a png or jpeg mage.
How can specify the ImageFileType for an Image control in pdf.
Document pdfDoc = new Document();
pdfDoc.getPageInfo().getMargin().setLeft(10);
pdfDoc.getPageInfo().getMargin().setRight(20);
pdfDoc.getPageInfo().getMargin().setTop(10);
pdfDoc.getPageInfo().getMargin().setBottom(10);
pdfDoc.getPages().add();
Image img1 = new Image();
img1.setFixHeight(50);
img1.setFixWidth(50);
ByteArrayInputStream bstream = new ByteArrayInputStream(bytes);
img1.setImageStream(bstream);
pdfPageItem.getParagraphs().add(img1);
pdfDoc.save("Sample.pdf");
Thanks
Leena Robert