Generation of Multiple Page PDF Document is slow
- From: bruno <bruno (at) lowagie.com>
- Date: Wed, 23 Aug 2006 08:54:08 +0200
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 (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions