Flying-Saucer is a nice library to generate PDF documents from within Java applications. Just generate a bunch of XHTML, throw…