2 Star 0 Fork 0

ixuer / gopdf_example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Go语言生成PDF文件

English | 简体中文

使用signintech/gopdf生成PDF文件。

测试用例覆盖面:

  1. 设置页面配置,如宽度和高度。
  2. test/font: 添加ttf字体,并设置字体。
  3. test/text: 写文本内容,包括长文本。
  4. test/line: 画不同种类的线。
  5. test/oval: 画一个椭圆形。
  6. test/polygon: 画一个多边形,像三角形,五边形。
  7. test/rectangle: 画一个矩形。
  8. test/image: 插入图像,选项可选,如旋转指定角度、垂直或水平翻转、遮罩、透明度。
  9. test/hyperlink: 添加内部或外部超链接。
  10. test/outline: 添加大纲(或称为书签),包括多级。
  11. test/compress: 设置压缩级别以压缩文件大小。
  12. test/protection: 为文档设置密码保护。
  13. test/import_tpl: 从模板导入,模板可以是已有的PDF文件,可以实现添加封面。

Tips:

  1. 测试用例位于gopdf_examples/test/目录下,每个用例都将通过自己的init函数初始化。
MIT License Copyright (c) 2022 ixuer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

signintech/gopdf代码示例 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/ixuer/gopdf_example.git
git@gitee.com:ixuer/gopdf_example.git
ixuer
gopdf_example
gopdf_example
main

搜索帮助

53164aa7 5694891 3bd8fe86 5694891