Hacker News new | ask | show | jobs
by andyhmltn 4748 days ago
Note how that doesn't create a PDF.
3 comments

Note that pretty much everyone has a PDF printer driver installed nowadays.
How does one go about creating (and sending) a PDF from a web form (like Invoice-o-matic and billable.me)?
I would take POST data, and plug it into a templating system (like Django's), which is using something like LaTeX to define the basic properties of the document and populating with data and logic from Django.

Basically a mix of two markups in one file. Meh, there's probably a better way to do that.

Eh, easy. http://jspdf.com/

You can create a file with javascript at the client side, without creating load on the server.

phantomjs could fix that for you.

http://phantomjs.org/