Home > Mobile >  How to show Buffered Image on PDF?
How to show Buffered Image on PDF?

Time:08-08

So basically I want to show a BufferedImage on a PDF-Document using Java and PDFBox. There was a way using this method (Add BufferedImage to PDFBox 2.0 document) but it seems to be deprecated. Is there any new way to show a BufferedImage on a PDocument?

CodePudding user response:

Try also LosslessFactory.createFromImage(PDDocument document, BufferedImage image) if your image is something with sharp edges. If your image is a photograph, then use the JPEGFactory methods.

  • Related