Ah. Ok, I think I understand. The full compression compresses both the stream data and the document structure, but the setCompressionLevel only compresses the stream data. So since the stream data is already compressed, I get no benefits from trying to further compress it. And the compression of the document structure is probably the problem with GS. I didn't find that little tidbit during my research of the issue.
Thanks, that was most helpful. Edward W. Rouse -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans-Werner Hilse Sent: Monday, August 11, 2008 12:43 PM To: [email protected] Subject: Re: [iText-questions] Question on compression. Hi, On Mon, 11 Aug 2008 11:57:18 -0400 "Edward W. Rouse" <[EMAIL PROTECTED]> wrote: > Yes I am. I run the program once with no compression, file size 34.3K. I run > again with compression level 9, file size 34.3K. No difference. Hm, OK. I think in that case, there's just no compressable (is that an English word? ;-)) data stream in it. > If I use setFullCompression, file size is 13.7K. In that case, certain structures are also compressed (please ask for more details, I've not yet dived into docs/code to have the full explanation). AFAIK, that's a PDF feature of later PDF versions (which is probably why those PDFs do not open w/ your version of Ghostscript). > So I ask again. Should the setCompressionLevel for PdfCopy be giving me a > smaller size file? And since it isn't, then how is setCompressionLevel > supposed to be used with PdfCopy? I guess you're using it already how it's supposed to be used. You might probably see differences when trying the same with other origin PDFs (which are compressable). I think the iText RUPS tool should also be a good debug tool. AFAIK, it'll show the compression in use for the streams contained in a PDF. -hwh PS: >pulling teeth< is rather self-explanatory, I think ;-) I didn't meant to sound harsh in my response. I wasn't exceptionally nice, either, but in fact, all those questions of mine were meant to provide further help... ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
