How To Create a PDF in Go: A Step-By-Step Tutorial

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • maroto

    A maroto way to create PDFs. Maroto is inspired in Bootstrap and uses gofpdf. Fast and simple.

  • But found the PDF library from 'github.com/johnfercher/maroto' and it worked well enough. Headaches solved. But please spare me from generating PDFs ever again! :P

  • pdfcpu

    A PDF processor written in Go.

  • LOL. I was searching for this yesterday. Another good option for doing this is by using pdfcpu Just in case anyone is interested.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gofpdf

  • gotenberg

    A developer-friendly API for converting numerous document formats into PDF files, and more!

  • Another option I use for Go was. Gotenberg which runs as a service and renders my go HTML templates to PDF.

  • unipdf

    Golang PDF library for creating and processing PDF files (pure go)

  • Yeah, they don't do that and, if you look at their GitHub, their source code is a purposely obfuscated mess with a proprietary license; so it's not real FOSS. Example: https://github.com/unidoc/unipdf/blob/master/ps/ps.go

  • gopdf

    A simple library for generating PDF written in Go lang

  • Now, a good example of PDF processing in Go can be found in the gopdf library. Their source is clear and uses an actual FOSS license. Example: https://github.com/signintech/gopdf

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts