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.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.