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