----------------------------------------
> Date: Wed, 31 Mar 2010 13:28:31 +0200
> From: [email protected]
> To: [email protected]
> Subject: Re: [iText-questions] iText compression modes
>
> 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
I guess I'd also mention that "lossless" to you means preservation of pixels
and maybe some document
structure ( LOL, although people seem to not want to put this in anyway) , not
arbitrary
stuff like the order of dictionary entries or something (I'm making
stuff up since I don't know PDF innards well enough but others
have pointed out that something can be permuted or moved without
effect on pixels coming out ). Winzip of course wouldn't know that,
but the PDF "compression" could maybe benefit from uninformative
ordering and allocate no bits for it in the compressed format. Again, however,
all of this is generated from a set of input data that is probably the most
concise representation of your PDF file you will get. Your images are unlikely
to compress better once they are mangled into a PDF file but an image
compression
algorigthm for your source images and text compression for your text
and font compression for your ( non-redundant) fonts would be a better way
to go. Of course, decompressing all of this ( regenerating the PDF again ) could
take a lot of time.
> 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/
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_2
------------------------------------------------------------------------------
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/