Gofpdf: Generate PDFs from Go with No Dependencies
Luckily I haven't had the need to create pdfs yet now that I'm using Go. However, if I would, I would generate LaTeX instead of PDFs directly. I did the same in Python a and it has turned out great: https://github.com/JelteF/PyLaTeXThe API can be made much more high level, because of all functionality and packages LaTeX has. The most important thing is to have a good escape function that is used by default for all text, otherwise it's very easy to execute arbitrary shell commands for an attacker. If anyone wants to create a Go package similar to mine, feel free to contact me if you want any more advice (email in github profile).