Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于Word转PDF后不关闭原Word文件的处理 #122

Open
wukangding opened this issue Sep 5, 2024 · 3 comments
Open

关于Word转PDF后不关闭原Word文件的处理 #122

wukangding opened this issue Sep 5, 2024 · 3 comments

Comments

@wukangding
Copy link

使用库将Word转PDF后,原Word文件没关闭
image

@CoderWanFeng
Copy link
Owner

按代码逻辑来说,转换的时候不会打开word文档(如下图箭头)。你确定word不是你运行代码之前打开的,忘记手动关闭了?
Snipaste_2024-09-06_00-10-25

@wjcper2008
Copy link

我也遇到同样问题,使用
word.docx2pdf(path=folder_name, output_path=f'{folder_name}/{name[i]}_pdf/')
程序结束后,word文档被占用(查看是word文档打开后没被关闭,只是界面上关闭,资源没被释放)。

@wuewuewuewuewue
Copy link

确实word还在后台运行,手动添加一个结束word就解决了
屏幕截图 2024-11-07 212000
然后当你完事了调用一下poword.mainWord.word_quit()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@wjcper2008 @wukangding @CoderWanFeng @wuewuewuewuewue and others