We have logged an investigation ticket as PDFJAVA-40416 in our issue tracking system for your requirements. We will further look into ticket details and let you know a soon as it is resolved. Please be patient and spare us some time.
ImagePlacement contains image data in some internal format not connected with BufferedImage. To get BufferedImage instance we need to save internal image data into an image with required options as a stream, then load it as BufferedImage:
Example:
//get image as Jpeg
ByteArrayOutputStream baos = new ByteArrayOutputStream();
xImage.save(baos, ImageType.getJpeg(), 150);
BufferedImage imBuff = ImageIO.read(new ByteArrayInputStream(baos.toByteArray()));
System.out.println("BufferedImage1: " + imBuff.toString());
//get image as PNG
baos = new ByteArrayOutputStream();
xImage.save(baos, ImageType.getPng(), 300);
imBuff = ImageIO.read(new ByteArrayInputStream(baos.toByteArray()));
System.out.println("BufferedImage2: " + imBuff.toString());
com.aspose.Image is used only during the PDF generation process. This object should be added into Paragraphs and will be processed when the document will be saved or processed paragraphs.