I used to use a Play framework module to create simple PDFs. You just do your formatting in html and render it as a PDF. https://www.playframework.com/modules/pdf (only for 1.x series). There seems to be a version for 2.x series but I have never used it(https://github.com/innoveit/play2-pdf).