Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i have 5 pdfs, after merge it becomes 2MB. so while opening pdf through my application it takes longer time. in acrobat there is an option to optimize pdf i also tried same. i.e 2.5 mb pdf after optimize it becomes 500kb.
same functionality i want to do in my code.i tried with iTextSharp SetFullCompression()method but its not working.
i know PDFTRON and BYTESCOUNT third party dll there 4 this, it costs more(around 1000$)i.e. my client not willing to buy. please share some knowledge how i can i come out from this problem.i am using iTextSharp for pdf genaration and merge.

If u people know any third party dll with lesser price update the same.


Thanks in advance.
Posted
Updated 7-Sep-11 23:58pm
v5

With free software, sometime you get what you paid for... Have you tried to reach their own support... or maybe check for the original iText documentation and support as the ported version might be very similar.

If iTextSharp does not support that option, then give your client 2 choices: Live with slow application or pay for a something faster application.

However, I would recommand you to try alternate product if possible. And take some performance measure with generated PDF and then you can show you client what it can get if he pay for.

But if you have a single client and he is not willing to pay, then you should leave it that way. After all, you should be paid for what you do... and such a library would typically cost much less than total development time of any almost application.
 
Share this answer
 
Comments
Akshaya Dash 25-Aug-11 1:41am    
thanks,
i have searched PDFTRON library for compress PDF, it it costs 1000$.
will have any cheaper library u know, let me know.

thanks in advance...
Unlesss your client doesn't pay you, using 3rd party will be alot cheaper than having you code it. When you say optimize I take it from your example that you mean smallest possible size and not fastest possible load time.

Ihave two thinks you should probably start with.
1) The should be pdf Linearized
2) The pdf should be compressed (PdfWriter.CompressionLevel = PdfStream.BEST_COMPRESSION)

Inorder to really "optimize" your PDF, you really need to know the PDF format
PDF Reference and Adobe Extensions to the PDF Specification [^]
thus 3rd party maight be alot cheaper for your client.
 
Share this answer
 
Comments
Philippe Mori 24-Aug-11 7:58am    
The OP poster uses iTextSharp which seems to be a free library. He probably get what he has paid for...
Simon Bang Terkildsen 24-Aug-11 8:12am    
True, ITextSharp is not bad library though, but it is designed to be easy to use and not to allow low level manipulation of the structure inside the pdf file.
Akshaya Dash 8-Sep-11 5:40am    
thanks you both 4 intrest.
if u people know in third party dll, please let me know.
I know PDFTRON and BYTESCOUNT, but it costs more.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900