gotenberg

module
v0.0.0-...-5a98790 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2021 License: MIT

README

Gotenberg logo

Gotenberg

A Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.

Documentation · Contributing


At TheCodingMachine, we build a lot of web applications (intranets, extranets and so on) which require to generate PDF from various sources. Each time, we ended up using some well known libraries and kind of lost time by reimplementing a solution from a project to another project. Meh.

Features

  • HTML and Markdown conversions using Google Chrome headless
  • Office conversions (.txt, .rtf, .docx, .doc, .odt, .pptx, .ppt, .odp and so on) using unoconv
  • Assets 📦: send your header, footer, images, fonts, stylesheets and so on for converting your HTML and Markdown to beautiful PDFs!
  • Easily interact with the API using our Go and PHP libraries

Quick start

Open a terminal and run the following command:

$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:6

The API is now available on your host at http://localhost:3000.

Head to the documentation to learn how to interact with it!

Badges

Docker pulls Docker image layers GitHub Actions GoDoc Codecov Go Report Card


Gotenberg logo

Directories

Path Synopsis
cmd
internal
app/xhttp
Package xhttp defines our own implementation of echo.Echo.
Package xhttp defines our own implementation of echo.Echo.
app/xhttp/pkg/context
Package context extends the default echo.Context.
Package context extends the default echo.Context.
app/xhttp/pkg/resource
Package resource helps managing arguments and files for a conversion.
Package resource helps managing arguments and files for a conversion.
pkg/chrome
Package chrome helps starting Google Chrome headless in background.
Package chrome helps starting Google Chrome headless in background.
pkg/conf
Package conf gathers all configuration data.
Package conf gathers all configuration data.
pkg/normalize
Package normalize helps removing special characters from a string.
Package normalize helps removing special characters from a string.
pkg/printer
Package printer helps converting a specific file type to PDF.
Package printer helps converting a specific file type to PDF.
pkg/xassert
Package xassert is a helper for converting and/or validating strings.
Package xassert is a helper for converting and/or validating strings.
pkg/xcontext
Package xcontext helps managing context.Context with timeout.
Package xcontext helps managing context.Context with timeout.
pkg/xerror
Package xerror helps standardizing the errors through the application.
Package xerror helps standardizing the errors through the application.
pkg/xexec
Package xexec helps creating exec.Cmd with logging and executing those commands without leaking orphan processes.
Package xexec helps creating exec.Cmd with logging and executing those commands without leaking orphan processes.
pkg/xlog
Package xlog defines a standard logger for the application.
Package xlog defines a standard logger for the application.
pkg/xrand
Package xrand helps generating random strings.
Package xrand helps generating random strings.
pkg/xtime
Package xtime helps generating time.Duration from seconds represented as float64.
Package xtime helps generating time.Duration from seconds represented as float64.
Package test contains useful functions used across tests.
Package test contains useful functions used across tests.
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL