Merge pull request #8053 from Evezerest/release2.6

Update pdf2word.py
pull/8068/head
Evezerest 2022-10-22 23:55:50 +08:00 committed by GitHub
commit 84f20f8259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# PDF2Word
PDF2Word是PaddleOCR社区开发者 [whjdark](https://github.com/whjdark) 基于PP-StructureV2版面分析与恢复模型实现的PDF转换Word应用程序提供可直接安装的exe应用程序**方便Windows用户离线、免环境配置运行**
PDF2Word是PaddleOCR社区开发者 [whjdark](https://github.com/whjdark) 基于PP-StructureV2版面分析与恢复模型实现的PDF转换Word应用程序提供可直接安装的exe应用程序**方便Windows用户免环境配置运行**
## 1.使用
@ -20,18 +20,20 @@ PDF2Word是PaddleOCR社区开发者 [whjdark](https://github.com/whjdark) 基于
> - 初次安装程序根据不同设备需要等待1-2分钟不等
> - 使用Office与WPS打开的Word结果会出现不同推荐以Office为准
> - 本程序使用 [QPT](https://github.com/QPT-Family/QPT) 进行应用程序打包,感谢 [GT-ZhangAcer](https://github.com/GT-ZhangAcer) 对打包过程的支持
> - 应用程序不支持盗版Windows系统若在安装过程中出现报错或缺少依赖推荐直接使用 `paddleocr` whl包应用PDF2Word功能详情可查看[链接](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/ppstructure/docs/quickstart.md)
### 脚本启动界面
首次运行需要将切换路径到 `/ppstructure/pdf2word` ,然后运行代码
首次运行需要将切换路径到PaddleOCR文件目录 ,然后运行代码
```
cd ./ppstructure/pdf2word
python pdf2word.py
```
### PaddleOCR whl包
针对Linux、Mac用户或已经拥有Python环境的用户**推荐安装 `paddleocr` whl包直接应用版面恢复功能**,详情可查看[链接](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/ppstructure/docs/quickstart.md)
针对Linux、Mac用户或已经拥有Python环境的用户**推荐安装 `paddleocr` whl包直接应用PDF2Word功能**,详情可查看[链接](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/ppstructure/docs/quickstart.md)
<a name="download"></a>
@ -42,9 +44,10 @@ python pdf2word.py
<div align="center">
<img src="https://user-images.githubusercontent.com/50011306/186369636-35f2008b-df5a-4784-b1f5-cebebcb2b7a5.jpg" width = "150" height = "150" />
</div>
## 3.版本说明
v0.2版新加入PDF解析功能仅提供full版本打包了所有依赖包与模型文件尽可能避免安装失败问题
v0.2版新加入PDF解析功能仅提供full版本打包了所有依赖包与模型文件尽可能避免安装失败问题。若仍然安装失败,推荐使用 `paddleocr` whl包
v0.1版最初版本分为3个版本

View File

@ -213,8 +213,8 @@ class Worker(QThread):
class APP_Image2Doc(QWidget):
def __init__(self):
super().__init__()
self.setFixedHeight(100)
self.setFixedWidth(420)
# self.setFixedHeight(100)
# self.setFixedWidth(520)
# settings
self.imagePaths = []
@ -481,7 +481,7 @@ class APP_Image2Doc(QWidget):
def handleThreadException(self, message):
self._thread.quit()
QMessageBox.information(self, message)
QMessageBox.information(self, 'Error', message)
def main():