I am using iText java lib with php script to fill-out pdf etc...
It worked perfectly on my computer, but when it went live on the server, it started acting up. For example the load time of pdf is totally unpredictable. Sometimes it would be almost instantaneous, like on my machine, and sometimes it would take up to 20 seconds.
I suspect it has something to do with JVM constantly loading up on every request. It it possible to somehow optimize for this situation?
The way I invoke it is simply:
exec('java -classpath ".;itextpdf-5.1.1.jar" StreamPdf blah.pdf blah.fdf target.pdf');