Hi Bruno, The example you suggested is working fine for me. However, the targent document was around 4MB in size with 100 pages. I tried the samething with same template using PDFLib, the document PDFLib created with 100 pages was around 150KB. Is there any approach to reduce the size of the document. I guess the size is due to copying of documents over many pages in the case of iText.
Thanks, Ganesh. Bruno Lowagie wrote: > > GaneshPrakhya wrote: > >>Hi Bruno, >> >>As you said in the previous thread (Abhishek's): >> >>"There are other ways to do it, and the book will give you >>another example using setField and setFieldCache, but >>the procedure described above is faster because it cuts >>a lot of corners. >> >>best regards, >>Bruno" >> >>I am exactly doing the same, I followed all your steps. Can you suggest me >>how to use setField and setFieldCache for setting AcroForm fields over >>multiple pages. If you can give me an example code, that will be great for >>me. >> > I planned to add a 'fast' example to this page: > http://itext.ugent.be/articles/eid-pdf/ (see the example at the bottom), > but I only found the time to write a description. > > Meanwhile maybe setFieldCache can help. > Just create a HashMap outside the loop that sets the fields: > HashMap fieldCache = new HashMap(); > Inside the loop you do: > form = stamper.getAcroFields(); > form.setFieldCache(fieldcache); > form.setField(...); > This should improve the performance. > > (Although not as drastically as the modus operandi > that is described without a code sample.) > br, > Bruno > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > -- View this message in context: http://www.nabble.com/Generation-of-Multiple-Page-PDF-Document-is-slow-tf2050222.html#a5941189 Sent from the iText - General forum at Nabble.com. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions