Your question is better suited for a java forum since as you said, you can't replace it.
I can't see why you need java. PDFs are a tree-ish with some circular references, text format under the hood. From searching CPAN, I found
CAM::PDF, which looks like it can manipulate the COS tree of a PDF. I've never used it personally. In other languages, I've written code that uses a PDF as a template, and using the PDF's COS tree format, fills in the data into the new PDF, not unlike HTML. Instead of java, you can try standalone text mode pdf tools, they will be faster than java since they are written in C/C++.