Generate invoice PDF in Go

While there are various Go libraries that can create PDF such as Maroto, UniPDF, wkhtmltopdf etc, I have stumbled upon GoFPDF which offers the capability to create complicated PDF file and in this article, we will be looking at how we can generate invoice PDF using GoFPDF.

Note that GoFPDF is no longer maintained, but it continues to function and serve our purpose well in this article.

Sample of invoice PDF generated