Gotenberg

一个由Docker驱动的无状态API,用于将HTML、Markdown和Office文档转换为PDF。「A Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF」

Github stars Tracking Chart

Gotenberg

一个由 Docker 支持的无状态 API,用于将 HTML、Markdown 和 Office 文档转换为 PDF。

文档 · 贡献


在 TheCodingMachine 上,我们建立了很多 web 应用程序(内部网、外联网等),这些应用需要从不同的来源生成 PDF。每一次,我们都使用了一些著名的库,并且因为从一个项目到另一个项目重新实现解决方案而损失了一些时间。咩~~~

功能介绍

  • 使用 Google Chrome 无头浏览器进行 HTML 和 Markdown 转换。
  • 使用 unoconv 进行 Office 转换(.txt, .rtf, .docx, .doc, .odt, .pptx, .ppt, .odp 等)。
  • 资产包:发送您的页眉、页脚、图像、字体、样式表等,以便将您的 HTML 和 Markdown 转换为漂亮的 PDF 文件。
  • 使用我们的 GoPHP 库轻松地与 API 交互。

快速启动

打开一个终端,运行以下命令。

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

现在在你的主机上可以使用 API 了,网址是 http://localhost:3000。

前往文档学习如何与之交互!


(The first version translated by vz on 2020.09.11)

Overview

Name With Ownergotenberg/gotenberg
Primary LanguageGo
Program languageGo (Language Count: 4)
PlatformDocker, Linux, Mac, Windows Subsystem for Linux (WSL)
License:MIT License
Release Count83
Last Release Namev8.5.0 (Posted on )
First Release Name3.0.0 (Posted on )
Created At2018-03-23 14:05:59
Pushed At2024-05-02 08:04:30
Last Commit At
Stargazers Count7k
Watchers Count63
Fork Count453
Commits Count706
Has Issues Enabled
Issues Count475
Issue Open Count24
Pull Requests Count148
Pull Requests Open Count2
Pull Requests Close Count81
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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 :package:: send your header, footer, images, fonts, stylesheets and so on for converting your HTML and Markdown to beaufitul 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 image layers
Travis CI
GoDoc
Codecov
Go Report Card


To the top