Ask HN: How to generate a pdf for website?

3 points by ai_ia ↗ HN
Hello,

I am very new to web site development and currently building a website, using react, which teaches online using text/gifs. At the end of the course, I would like to generate a sort of pdf book customized with the user inputs that are spread over the course.

Now, I would like a better design for the book and earlier for one of my own personal project, I used tufte-latex and loved the experience. I have searched for solutions online, but the highly recommended PhantomJS is not really easy to pick up.

Can anyone prime me about setting up a pdf generator using latex or any other suitable solution?

I expect around 3k users at least and some initial traction for people interested in the website.

Thanks and Regards ai_ia

6 comments

[ 3.0 ms ] story [ 17.0 ms ] thread
One "other suitable solution" could be to use Quickscript (http://quickscript.sourceforge.net/index.html). It is a Postscript based document formatter. The markup format it uses is relatively straighforward. You would output a suitable "qs" file, and then feed the document formatting code plus the "qs" file through ghostscript to generate a pdf.
(comment deleted)
If you're building your backend in Python with Django or Tornado you could use ReportLab's open source PDF generator [1]. ReportLab's founder, Andy Robinson was Mark Hammond's co author on Python Programming for Win32.

[1] http://www.reportlab.com/opensource/

I looked at ReportLab. Have you used it before in any project? I really want to make the pdfs beautiful looking. Is ReportLab comparable to Latex?
I have used ReportLab; it's easy to use and the results look good. Never used Latex, so can't comment on that.
pdfjs if an option if you want to generate it on the browser (clientside).