scriptoid wrote:
> Hello Bruno
> 
> We are need to be able to compress the PDF files as much as we can to store
> our clients' PDF files.
> 
> It is VITAL for us to do that and we would like to keep us using iText.
> 
> I've compressed some jPEG (10 files aprox. 3.3Mb in total)  files using 
> ImageMagic
> [convert *.jpg -alpha off -monochrome -compress Zip -quality 100 -units
> PixelsPerInch -density 600  image_deflate.pdf]
> and the generated PDF was 700kB while using iText was 3.6Mb.

You're mixing different concepts. When you set the compression for an 
image in iText, you are talking about LOSSLESS compression. When you set 
the compression for an image in ImageMagic, you're talking about LOSSY 
compression.
In iText, the number of pixes (the resolution) isn't changed. I'm sure 
that ImageMagic reduces the resolution.

> I personally dug into your book for compression tips but even with
> PdfStamper & setFullCompression the file was still 3.3Mb.

Read section 10.2.6 of the second edition: "Lossless compression won't 
result in dramatic file size reduction. However, if lossy compression is 
acceptable, you could use the java.awt.Image to reduce the quality." 
Listing 10.12 shows an example named CompressAwt that explains how to 
reduce the resoltution.

If you have hints to phrase this in a better way so that people don't 
have the same question you have, feel free to post your suggestions here.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to