Hacker News new | ask | show | jobs
by ilamparithi 3737 days ago
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).
2 comments

I do the same but using the flying-saucer library. Just pass the HTML text (with CSS) and it gives back a PDF. Up to a certain point the limitation was getting the header row of multipage tables to appear i every page. When they got to implementing support for CSS 2.1, worked like a charm. Headers and Footers (witblh page numbers) work too.
What? People still us Flying Saucer?!
We outsourced this to DocRaptor (http://docraptor.com) - we just call an API with our HTML and CSS, get back pretty invoices.
Which is just a SaaS version of PrinceXML (http://www.princexml.com/)