Why don't you just use a tool such as Adobe Acrobat's Compare function to find 
out where the differences are?  

Or if size is that important and you are OK with the results - why not just 
process all of your PDFs through Multivalent before sending them along...

Leonard

-----Original Message-----
From: srinivas.bodduluri [mailto:srinu.he...@gmail.com] 
Sent: Wednesday, July 29, 2009 5:27 AM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Problem with Pdf Size:Pdf Size is reduced by 87% 
When i ran IText Generated Pdf using Multivalent20060102.jar tool.


Hello Paulo, Thanks for the quick reply. 
      
         Yes you are correct, we figured out this problem yesterday late
night like multivalent is removing the metadata from the image using the
following code snippet,

 

>         IIOImage iioimage = new IIOImage(bufImage, null, null);
>         imagewriter.write((IIOMetadata)null, iioimage, null);
> 

Then we did the removal of the metadata from the images before sending it to
IText. There is some reduction in the size of PDF. We came to know that
Images are not the culprit. Still we are experiancing some 80% reduction in
the multivalent comression. Some thing else unwanted data that we are
feeding to IText which is causing drastic increase in the size. I am
exercising to figure out what is that data.

The output of multivalent after this processing of images pdf is 

C:>java -cp Multivalent20060102.jar tool.pdf.Compress -compact -jpeg -old
itext.pdf
file:/C:/itext.pdf, 1086087 bytes
PDF 1.5, producer=iText 2.1.3 (by lowagie.com), creator=null
additional compression may be possible with:
         -compact
=> new length = 210013, saved 80%, elapsed time = 1 sec

I am attaching the samples of processed images as a zip "used_images.zip"
and IText generated PDF "itext.pdf" and multivalent compressed PDF
"multivalent.pdf".

Thanks In Advance,
Srinivas.

http://www.nabble.com/file/p24718209/itext.pdf itext.pdf 
http://www.nabble.com/file/p24718209/multivalent.pdf multivalent.pdf 
http://www.nabble.com/file/p24718209/used_images.zip used_images.zip 



Paulo Soares-3 wrote:
> 
> Looks like multivalent is subsampling the images or reducing the quality
> even if it's not perceptible by you. iText adds the images as they are but
> you can use JAI or some other graphical library to reduce the size of the
> images before adding them.
> 
> Paulo 
> 
>> -----Original Message-----
>> From: srinivas.bodduluri [mailto:srinu.he...@gmail.com] 
>> Sent: Wednesday, July 29, 2009 6:20 AM
>> To: itext-questions@lists.sourceforge.net
>> Subject: [iText-questions] Problem with Pdf Size:Pdf Size is 
>> reduced by 87% When i ran IText Generated Pdf using 
>> Multivalent20060102.jar tool.
>> 
>> 
>> Hello All,
>>            We are using IText 2.1.3 as part of our 
>> application to fulfill a
>> critical business use case. As a module implementer i am very 
>> impressed with
>> the IText library and more importently my client. 
>> 
>> There was one problem we are facing regarding to Pdf size is 
>> becoming very
>> large. I am working on deeply from past few days to find the 
>> alternatives to
>> reduce the IText generated pdf size. I found one java tool to 
>> compress the
>> pdf file in sourceforge.net ie,. Multivalent20060102.jar and 
>> when i ran the
>> original Pdf generated by IText in this tool surprisingly the 
>> size reduction
>> is about 87% without loosing the quality of images.
>> 
>> When i ran the tool it gives me the following output.
>> 
>> C:\>java -cp Multivalent20060102.jar tool.pdf.Compress 
>> -compact -jpeg -old
>> original.pdf
>> file:/C:/Documents%20and%20Settings/BSrinivas/Desktop/original
>> .pdf, 1226715
>> bytes
>> PDF 1.5, producer=iText 2.1.3 (by lowagie.com), creator=null
>> additional compression may be possible with:
>>          -compact
>> => new length = 158388, saved 87%, elapsed time = 1 sec
>> 
>> When i created the Pdf without images there is no much 
>> compression by above
>> tool. I am wondering did i made any programatical mistake in 
>> adding the
>> images. I have attached the pdfs generated by IText 
>> "original.pdf" and when
>> compressed using the tool "original-o.pdf"
>> 
>> can any one help me in inspecting the original.pdf file in 
>> what metadata
>> causing the pdf size to became huge.
>> 
>> http://www.nabble.com/file/p24699273/original.pdf original.pdf 
>> http://www.nabble.com/file/p24699273/original-o.pdf original-o.pdf 
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Problem-with-Pdf-Size%3APdf-Size-is-redu
>> ced-by-87--When-i-ran-IText-Generated-Pdf-using-Multivalent200
>> 60102.jar-tool.-tp24699273p24699273.html
>> Sent from the iText - General mailing list archive at Nabble.com.
>> 
>> 
>> --------------------------------------------------------------
>> ----------------
>> Let Crystal Reports handle the reporting - Free Crystal 
>> Reports 2008 30-Day 
>> trial. Simplify your report design, integration and 
>> deployment - and focus on 
>> what you do best, core application coding. Discover what's new with 
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> 
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> 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/
>> 
> 
> Aviso Legal:
> 
> Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
> informação confidencial ou legalmente protegida. A incorrecta transmissão
> desta mensagem não significa a perca de confidencialidade. Se esta
> mensagem for recebida por engano, por favor envie-a de volta para o
> remetente e apague-a do seu sistema de imediato. É proibido a qualquer
> pessoa que não o destinatário de usar, revelar ou distribuir qualquer
> parte desta mensagem. 
> 
> 
> 
> Disclaimer:
> 
> This message is destined exclusively to the intended receiver. It may
> contain confidential or legally protected information. The incorrect
> transmission of this message does not mean the loss of its
> confidentiality. If this message is received by mistake, please send it
> back to the sender and delete it from your system immediately. It is
> forbidden to any person who is not the intended receiver to use,
> distribute or copy any part of this message.
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day 
> trial. Simplify your report design, integration and deployment - and focus
> on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 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/
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-Pdf-Size%3APdf-Size-is-reduced-by-87--When-i-ran-IText-Generated-Pdf-using-Multivalent20060102.jar-tool.-tp24699273p24718209.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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/
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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