----------------------------------------
> Date: Wed, 31 Mar 2010 03:51:35 -0700
> From:
> To: [email protected]
> Subject: Re: [iText-questions] iText compression modes
>
>
> Hello Bruno
>
> We are need to be able to compress the PDF files as much as we can to store
> our clients' PDF files.
Apparently you are responding to a message that discusses compression
and the need to add code to itext to do that as part of the creation
process. This would presumably be the best non-lossy compression as
it "knows the data" and isn't just empirically trying to find statistical
patterns- for example, if you tried to use winzip on a pdf file.
Contrary to what many managers may think, the PDF
creation process doesn't add information ( "gee, we just multiplied the
file size by 10, look at all that new information and knowledge we generated")
and it may in fact be that the best compression is simply to save all the
input data although others have pointed out that this input data
may be quite covert and difficult to find if you want pixel level
reproducibility.
This "input data" would in fact be something like a "decomposition" of your PDF
if you had a way to do that as is done with audio in something like ACELP
but this would be lossless- ACELP tries to fit an arbitrary waveform to a
limited
input model and doesn't always work, you already have the input data.
Image compression of course is often lossy, and you may not have a losssless
restriction.
If you really do want minimum file size and don't care about speed or
other attributes and can tolerate lossy compression, there are a lot of
options. You could even try some lossless data compression things like bzip2 I
guess
but again it is better and faster if "you"( the compression algorithms) know
what is in the data rather than having to guess or discover it.
>
> 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.
>
> As the storage is a BIG concern for us we are trying to find a solution.
>
> I personally dug into your book for compression tips but even with
> PdfStamper & setFullCompression the file was still 3.3Mb.
>
> ANY help or suggestion will be much appreciated.
>
>
>
>
>
> Bruno Lowagie (iText) wrote:
>>
>> Bruno Lowagie wrote:
>>> How much does that matter for your customer?
>>
>> I've just checked. Introducing the concept of compression
>> level would involve changing about 20 classes.
>>
>> It would be possible to set the compression level:
>> - on the writer level (mostly page content streams)
>> - some Image streams
>> - font streams
>> - embedded file streams
>>
>> I'll see if I have the time to do this.
>> While I'm at it, I could also look at the encryption
>> of embedded file stream.
>>
>> Is there anybody I can invoice for this work?
>> Tobias' customer? Tony's customer?
>> br,
>> Bruno
>>
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850552/direct/01/
------------------------------------------------------------------------------
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/