java - Apache PDFBox PDJpeg Inflated Image -
why jpeg image inflate when added pdf using apache pdfbox?
the image size bigger. search found nil help me.
i using bufferedimage. how can prepare image same size 1 time added pdf?
here's code:
pdpage page = null; pdxobjectimage image = null; doc = new pddocument(); page = new pdpage(); doc.addpage(page); pdpagecontentstream content = new pdpagecontentstream(doc, page); bufferedimage bimg = null; bimg = imageio.read(new file("picture.jpg")); image = new pdjpeg(doc, bimg); content.drawimage(image, 100, 500); content.close(); doc.save("test.pdf");
java pdf pdfbox
No comments:
Post a Comment