You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
966 B
45 lines
966 B
gin-PDF-Jpegs
|
|
|
|
Gin-PDF-JPEgs 是一个基于 gin+ Go-FITz 开发的pdf转jpeg图片的项目。
|
|
|
|
## 文件结构
|
|
|
|
|
|
```shell
|
|
├─ .gitignore
|
|
│ go.mod // 项目依赖
|
|
│ go.sum
|
|
│ LICENSE
|
|
│ main.go //主程序
|
|
│ README.md
|
|
│
|
|
├─img //解析后的jpeg文件存放位置
|
|
│ │ readme.md
|
|
│ └─ *.jpg //生成的jpeg文件
|
|
├─pdf // 测试pdf文件存放位置
|
|
│ └─ *.pdf
|
|
└─go-fitz // go-fitz 源码存放位置(为了方便查看源码合并过来的,不需要的话可以直接删除)
|
|
|
|
```
|
|
|
|
|
|
## 安装环境
|
|
|
|
```shell
|
|
go get -u https://git.liushuai.cq.cn/lsadmin/gin-PDF-Jpegs
|
|
go mod tidy
|
|
```
|
|
|
|
## 调试
|
|
```shell
|
|
go run gin-PDF-Jpegs
|
|
```
|
|
- 浏览器访问
|
|
```
|
|
http://127.0.0.1:8080/parsingPdf?pdfFilePath=pdf/php%20convert_%E7%99%BE%E5%BA%A6%E6%90%9C%E7%B4%A2.pdf&outPath=img/
|
|
```
|
|
|
|
## 依赖
|
|
|
|
- go-fitz github.com/gen2brain/go-fitz AGPL license
|
|
- MuPDF https://mupdf.com/ AGPL license |