When I try to draw png images using pdfBox, the pages remain blank. Is there any way to insert png images using pdfBox?
public void createPDFFromImage( String in
There is a pretty nice utility class PDImageXObject to load Images from a java.io.File. As far as I know, it works well with jpg and png files.
PDImageXObject pdImage = PDImageXObject.createFromFileByContent(imageFile, doc); contentStream.drawImage(pdImage, 20f, 20f);