
Ask HN: How to generate a pdf for website? - ai_ia
Hello,<p>I am very new to web site development and currently building a website, using react, which teaches online using text&#x2F;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.<p>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.<p>Can anyone prime me about setting up a pdf generator using latex or any other suitable solution?<p>I expect around 3k users at least and some initial traction for people interested in the website.<p>Thanks and Regards
ai_ia
======
pwg
One "other suitable solution" could be to use Quickscript
([http://quickscript.sourceforge.net/index.html](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.

------
osullivj
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/](http://www.reportlab.com/opensource/)

~~~
ai_ia
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?

~~~
osullivj
I have used ReportLab; it's easy to use and the results look good. Never used
Latex, so can't comment on that.

------
anilgulecha
pdfjs if an option if you want to generate it on the browser (clientside).

