update readme

This commit is contained in:
lixiaofei123
2021-09-16 22:56:27 +08:00
parent 9b8874230e
commit 0a181b48aa
7 changed files with 21 additions and 4 deletions
+15 -2
View File
@@ -23,13 +23,26 @@ docker run -d --name pdftoolbox --restart=always -p 8082:8082 -v /data/pdftoolbo
启动成功后,在浏览器中访问 http://ip:8082,如下图所示
![pdf在线压缩首页](./images/index.jpg)
![pdf工具箱首页](./images/index.jpg)
点击【点击此处上传】按钮,选择要转换的文件,即可上传。目前支持三种压缩质量
选择上方的【pdf压缩】,然后点击【点击此处上传】按钮,选择要转换的文件,即可上传并压缩。目前支持三种压缩质量
- 高质量 (300dpi)
- 中质量 (150dpi)
- 低质量 (72dpi)
如下图所示
![压缩pdf](./images/compress.jpg)
选择上方的【pdf压缩】,然后点击【点击此处上传】按钮,选择要转换的文件,即可上传并进行OCR文字提取。目前导出格式为txt。此过程会比较慢,请耐心等待。等待完毕后即可下载。
![OCR文字提取](./images/ocr.jpg)
识别结果如下图所示:
![OCR文字提取结果](./images/ocr_result.jpg)
### 在Linux上部署
请参考Dockerfile文件
+5 -1
View File
@@ -63,7 +63,11 @@ func (w *CommandWriter) Write(p []byte) (n int, err error) {
w.progress(float32(w.handlePage)/float32(w.totalPage), Compressing, "")
} else if strings.Contains(line, "error") && w.state != Error {
reason := line[strings.Index(line, "error")+6:]
w.progress(100, Error, reason)
w.progress(1, Error, reason)
w.state = Error
} else if strings.Contains(line, "Error") && w.state != Error {
reason := line[strings.Index(line, "Error")+6:]
w.progress(1, Error, reason)
w.state = Error
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

+1 -1
View File
@@ -208,7 +208,7 @@ img {
}
.progress-bar {
height: 3px;
height: 5px;
background-color: #409EFF;
}