Gotenberg

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

Github星跟踪图

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)

主要指标

概览
名称与所有者gotenberg/gotenberg
主编程语言Go
编程语言Go (语言数: 4)
平台Docker, Linux, Mac, Windows Subsystem for Linux (WSL)
许可证MIT License
所有者活动
创建于2018-03-23 14:05:59
推送于2025-04-17 09:28:22
最后一次提交
发布数114
最新版本名称v8.20.1 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数9.1k
关注者数67
派生数610
提交数881
已启用问题?
问题数636
打开的问题数38
拉请求数187
打开的拉请求数5
关闭的拉请求数96
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

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