We have already covered pdf generation to some degree, by using wkhtmltopdf on AWS’ Lambda service. This post is about generating pdfs without needing wkhtml – by building the pdf from Go itself. To do this we use a library called gofpdf to build the pdf.
It quite stright forward for simple documents, but gets more complicated the more you add to it. In our example we add some text as a title and an image just beneath it.