Is there a good library for pdf generation golang?

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

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

    A simple library for generating PDF written in Go lang

    https://github.com/signintech/gopdf is not declarative. Our use-case is to generate a receipt which contains a lot of dynamic data depending on the customer. Other ways to achieve this could be to use html templates and generate html and use tools like wkhtmltopdf for conversion from html to pdf. But, are these tools good enough to handle the pdf styling?

  • gofpdf

    gofpdf is an archived project but still works very well for me https://github.com/jung-kurt/gofpdf

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • gofpdf

    A PDF document generator with high level support for text, drawing and images (by phpdave11)

    There are several forks https://github.com/phpdave11/gofpdf and a most recent i believe https://github.com/go-pdf/fpdf

  • fpdf

    A PDF document generator with high level support for text, drawing and images

    There are several forks https://github.com/phpdave11/gofpdf and a most recent i believe https://github.com/go-pdf/fpdf

  • gotenberg

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

    I use https://github.com/thecodingmachine/gotenberg, it’s great.

  • pdfcpu

    A PDF processor written in Go.

    I've also seen https://github.com/pdfcpu/pdfcpu. Not sure if it suits your use case, but seems like it's very actively maintained

  • pandoc

    Universal markup converter

    I would vouch for “pawn this off to another stack” approach. Prepare HTML/Markdown and in golang and then just call Pandoc or some other tool for making PDFs.

  • 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.

  • unipdf

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

    UniPDF is an incredible PDF manipulation library that has transformed the way we handle documents. Its versatility, ease of use, and exceptional performance make it a must-have for any Golang developer. Whether you need to create, modify, or extract content from PDF files, UniPDF delivers with impressive precision and efficiency. The rich set of features and robust standard-compliant output give developers the freedom to craft dynamic and personalized PDFs effortlessly. With UniPDF, the possibilities are limitless, making it an indispensable tool for streamlining document workflows and revolutionizing the way we work with PDFs. Kudos to the UniDoc team for creating such a powerful and user-friendly library! 👏📄🚀

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