If you want to generate pdf in a specific format then using FOP toolfrom jakarta you can very well generate pdfs by putting data in xmland formating it with the help of xslt.