Before you close the stamper/reader - add:

reader.removeAnnotations();
reader.removeUnusedObjects();
stamper.setFullCompression();

Sean




tim clark-10 wrote:
>Hi All
>I have been using the itext lib in a app for a year or so typically to 
>merge 
>db content in to pdf form field documents
>created with adobe acrobat.
>Recently we have been merging to some rather large data and the size of 
>the 
>pdf document has now become an issue
>Today I looked at some simple pdf document & created some metrics
>PDF flatten document after form field merge 341K
> PdfStamper.FreeTextFlattening = True
> PdfStamper.FormFlattening = True
>PDF document after using the AdobeAcrobat Tool-Optimized-Optimize the 
>Pdf 
>for fast web view
>179K

>base on comparison between AdobeAcrobat -Tools-Optimize-Audit Space 
>Usage 
>before /after
>the objects "X Objects forms" show almost a 300% reduction 231K-78K

>A similar sized reduction was observed with other itext generated pdf 
>that 
>were run through the
>itext pdfstamper & acrobat optimization process

>Does anyone have experience with what setting can be applied to 
>pdfstamper 
>to create a similar file size reductions ?
We are faceing the same problem. Actually we are using ColumnText for 
text-fields and add the Text/(FontSize for it) ourself. This leads in our 
use-case to smaller pdf-files.

>Its would appear that the x object refs that the forms fields are 
>flattened 
>into is the issue here can anyone else confirm this is a know issue??
>Is this a bug or feature request that should be submitted to a the itext 
>bug 
>tracker ??

-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser 


HCSC Company Disclaimer

The information contained in this communication is confidential, private,
proprietary, or otherwise privileged and is intended only for the use of
the addressee.  Unauthorized use, disclosure, distribution or copying is
strictly prohibited and may be unlawful.  If you have received this
communication in error, please notify the sender immediately at (312)
653-6000 in Illinois; (800)835-8699 in New Mexico; (918)560-3500 in
Oklahoma; or (972)766-6900 in Texas.
------------------------------------------------------------------------------
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
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