I´ve resolved the issue making a class in my project that inherits PDJpeg and implements a constructor Which receives a float for compressionQuality, used when writing To the outputStream used inside the class.
After making that way I thought that the best way is to have the third argument as a ImageWriteParam. So we could pass others parameters to write the raster on the stream. cheers -----Mensagem original----- De: José Rodolfo Carrijo de Freitas [mailto:[email protected]] Enviada em: terça-feira, 17 de agosto de 2010 16:41 Para: [email protected] Assunto: RES: PDJPeg inflating image. I found that is not a issue of pdfbox. On line 140 of PDJpeg class There is a line : ImageIO.write(bi,"jpeg",os); On this line it gets a bigger "os" cause the buffered image, bi, has the raster and not the compacted image, so its writing a new image, and writes a bigger one. I wonder if I could have a better luck. =) Thank you. -----Mensagem original----- De: José Rodolfo Carrijo de Freitas [mailto:[email protected]] Enviada em: terça-feira, 17 de agosto de 2010 15:30 Para: [email protected] Assunto: PDJPeg inflating image. Hello all, Im trying to squeeze my pdf images to get a smaller pdf. When I m going to insert the compacted image in the pdf, the PDJPeg class makes my images big. I don´t know if I have to set some king of specific metadata to keep my image size, and I hope some of you could give me a tip What can I do to not have my image inflated ? Thank you.
