Currently I am using FOP to generate a pdf from java code and an xslt document. The FOP spits out a PDF file that is displayed (embeded) into a webpage. The documents can range between one and several thousand pages long, and it can take some time to generate them.
Is there a better tool that and do this? Is FOP the best option in the opensource and free world?
This answer is too late for you, but in case it helps other searchers, Docmosis can generate documents at a fairly hefty rate, and can spread a high load across multiple machines. It uses OpenOffice as the underlying format conversion engine, adding document population and manipulation facilities via the Docmosis Java API.
Several thousand page documents are going to take most systems a while, but if the system (or your code) allows you to parallelise and distribute the effort, then at least the average document rate can be high, even if the individual document time may be significant.
JODReports is another similar option.