Я использую Python 3.8 и Docx2pdf 0.1.7. Я старался целую вечность, чтобы получить что -то в моем сценарии, что преобразует DOCX в PDF. Я пробовал все виды вещей, но до сих пор для меня ничего не сработало. Я попытался запустить его в своем сценарии, но я также попытался запустить его в качестве подпроцесса, но ни один из них не работал. Документация модуля здесь.from docx import Document
from docx.shared import Pt
from tkinter import *
from docx2pdf import convert
root = Tk()
# Then some irrelevant code for this question
def updater()
doc = Document('./Contract.docx')
# Then some code which updates the doc according to the tkinter Entry input
# Save it according to some of the input from the GUI
doc.save('/Users/Jem/Documents/Huurovereenkomsten/Specifiek/{}/contract{}.docx'.format(nospaceadres,
naamhuurder.get()))
# It all works fine until here
convert('/Users/Jem/Documents/Huurovereenkomsten/Specifiek/{}/contract{}.docx'.format(nospaceadres,
naamhuurder.get())) # This should convert it to a pdf with the same name in the same folder
# Some Tkinter GUI code which is also irrelevant for this question
root.mainloop()
< /code>
Но сначала это дает мне это: < /p>
0%| | 0/1 [00:02
Подробнее здесь: https://stackoverflow.com/questions/626 ... ipt-mac-os
Почему модуль DOCX2PDF не преобразует DOCX в PDF в моей OS Python Script Mac OS? ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Google Cloud Scheduler не может найти Script Script Script Script Cloud Run aname lobname
Anonymous » » в форуме Python - 0 Ответы
- 6 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Google Cloud Scheduler не может найти Script Script Script Script Cloud Run aname lobname
Anonymous » » в форуме Python - 0 Ответы
- 7 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Google Cloud Scheduler не может найти Script Script Script Script Cloud Run aname lobname
Anonymous » » в форуме Python - 0 Ответы
- 4 Просмотры
-
Последнее сообщение Anonymous
-