https://github.com/tiechui1994/gopdf
pdf document generation library
https://github.com/tiechui1994/gopdf
golang gopdf markdown markdown-parser pdf
Last synced: 23 days ago
JSON representation
pdf document generation library
- Host: GitHub
- URL: https://github.com/tiechui1994/gopdf
- Owner: tiechui1994
- License: mit
- Created: 2018-11-18T05:58:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T01:27:17.000Z (almost 3 years ago)
- Last Synced: 2024-06-18T18:45:16.663Z (over 1 year ago)
- Topics: golang, gopdf, markdown, markdown-parser, pdf
- Language: Go
- Homepage:
- Size: 31.7 MB
- Stars: 118
- Watchers: 4
- Forks: 39
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## gopdf





## 项目介绍
gopdf 是一个生成 `PDF` 文档的 `Golang` 库. 主要有以下的特点:
- 支持 Unicode 字符 (包括中文, 日语, 朝鲜语, 等等.)
- 文档内容的自动定位与分页, 减少用户的工作量.
- 支持图片插入, 支持多种图片格式, `PNG`, `BMP`, `JPEG`, `WEBP`, `TIFF`
- 支持文档压缩
- 复杂表格组件, 块文本等
- `markdown` 文本可以直接转换成 `pdf`
- 手动实现了 `markdown` 解析库, 可以提供其他 `markdown` 开发
## 安装
```
go get -u github.com/tiechui1994/gopdf
```
## 案例展示:

代码参考 `example/complex_report_test`

代码参考 `example/simple_table_test`

代码参考 `example/mutil_table_test`
## 未来开发计划
1. ~~准备尝试开发 `Markdown` 的语法解析库, 然后通过解析库将 `markdown` 转换成 pdf, 可以支持定义一些颜色风格. 目前正
在研究 `marked.js` 前段库, 寻找灵感.~~
2. 优化 `Markedown` 的解析库, 调整 `markdown` 转 pdf 的参数, 使得 pdf 页面更美观.
3. 开发更加通俗易用的组件, 比如 `paragraph`, `tablecell` 等.
4. 使用 node 相关的技术进行桥接操作.