系列文章:
01.python 不管何時何地,只要點兩下,資料夾內的所有pdf都會合併成一個pdf
https://skjhcreator.blogspot.com/2022/06/pythonpdfpdf.html
02.python 只要點兩下,分別對各資料夾內的pdf合併,合併後的檔名要讓人知道來自哪個資料夾
https://skjhcreator.blogspot.com/2022/06/python-pdf.html
03. 只要點兩下,就能將一堆的Doc與Docx 轉成 PDF
03.https://skjhcreator.blogspot.com/2023/05/docdocx-pdf.html
04.只要點兩下,就能將一堆的JPG轉成一個PDF,並以JPG所在的資料夾名稱為PDF的檔名
04.https://skjhcreator.blogspot.com/2023/06/jpgpdfjpgpdf.html
05.只要點兩下,就能將放進input的一堆PDF轉成各自的WORD
05.https://skjhcreator.blogspot.com/2023/10/inputpdfword.html
06.只要點兩下,就能將放進input的一堆PDF轉成在ouput資料夾內的各自的WORD
06.https://skjhcreator.blogspot.com/2023/10/inputpdfouputword.html
07.只要點兩下,就能夠將InputAndOutput資料夾底下的子子孫孫資料夾內所有Word通通轉成PDF
07.https://skjhcreator.blogspot.com/2024/09/word-word-pdf.html
08.只要點兩下,就可以將資料夾input內的所有Word通通轉成一個PDF
08.https://skjhcreator.blogspot.com/2025/07/inputwordpdf.html
09.只要點兩下兩次,就能依照設定拆分指定PDF頁數並合併成設定好的一個PDF
09.https://skjhcreator.blogspot.com/2025/09/pdfpdf.html
10.只要點兩下,就能將input資料夾內所有PDF進行容量壓縮
10.https://skjhcreator.blogspot.com/2026/04/inputpdf.html
01.python 不管何時何地,只要點兩下,資料夾內的所有pdf都會合併成一個pdf
https://skjhcreator.blogspot.com/2022/06/pythonpdfpdf.html
02.python 只要點兩下,分別對各資料夾內的pdf合併,合併後的檔名要讓人知道來自哪個資料夾
https://skjhcreator.blogspot.com/2022/06/python-pdf.html
03. 只要點兩下,就能將一堆的Doc與Docx 轉成 PDF
03.https://skjhcreator.blogspot.com/2023/05/docdocx-pdf.html
04.只要點兩下,就能將一堆的JPG轉成一個PDF,並以JPG所在的資料夾名稱為PDF的檔名
04.https://skjhcreator.blogspot.com/2023/06/jpgpdfjpgpdf.html
05.只要點兩下,就能將放進input的一堆PDF轉成各自的WORD
05.https://skjhcreator.blogspot.com/2023/10/inputpdfword.html
06.只要點兩下,就能將放進input的一堆PDF轉成在ouput資料夾內的各自的WORD
06.https://skjhcreator.blogspot.com/2023/10/inputpdfouputword.html
07.只要點兩下,就能夠將InputAndOutput資料夾底下的子子孫孫資料夾內所有Word通通轉成PDF
07.https://skjhcreator.blogspot.com/2024/09/word-word-pdf.html
08.只要點兩下,就可以將資料夾input內的所有Word通通轉成一個PDF
08.https://skjhcreator.blogspot.com/2025/07/inputwordpdf.html
09.只要點兩下兩次,就能依照設定拆分指定PDF頁數並合併成設定好的一個PDF
09.https://skjhcreator.blogspot.com/2025/09/pdfpdf.html
10.只要點兩下,就能將input資料夾內所有PDF進行容量壓縮
10.https://skjhcreator.blogspot.com/2026/04/inputpdf.html
Just two clicks and you can convert a bunch of Doc and Docx files into PDF format.
最近遇到一個問題,想要把一堆的Word 轉成PDF。當然可以用手動的方式,一個個用Word打開,另存新檔,然後另存成PDF。可是這樣很麻煩,要是有100多個以上的Doc與Docx,然後要一一打開後再另存成PDF。有沒有更快的方法!!只要讓我點兩下滑鼠,不管有多少個Doc與Docx就能自動轉換成PDF?
I recently encountered a problem where I wanted to convert a bunch of Word files into PDFs. Of course, I could do it manually by opening each file in Word, saving it as a new file, and then saving it as a PDF. But that's very tedious, especially if there are more than 100 Doc and Docx files that need to be converted. Is there a faster way? Ideally, I would like to be able to convert all of the files to PDF with just two clicks of the mouse, regardless of how many Doc and Docx files there are.
Here is the website where you can download the program and find instructions:
Download。Extraction Password: demo1234
使用教學(Instructional videos):
Download。Extraction Password: demo1234
使用教學(Instructional videos):
安裝pywin32套件(Install the pywin32 suite)
指令(command):pip install pywin32
指令(command):pip install pywin32
程式名稱(Program name):Word2Pdf.py
程式內容(Code):
# pip install pywin32
import glob
import os
from win32com import client
path=os.getcwd()
os.chdir(path+'\\input\\')
word = client.Dispatch("Word.Application")
for i in glob.glob('*.doc'):
print("Convert "+path+'\\input\\'+i+" to PDF!")
doc = word.Documents.Open(path+'\\input\\'+i)
doc.SaveAs("{}.pdf".format(path+'\\output\\'+i[:-4]),17)
print("{}.pdf".format(path+'\\output\\'+i[:-4])+" OK!")
doc.Close()
for i in glob.glob('*.docx'):
print("Convert "+path+'\\input\\'+i+" to PDF!")
docx = word.Documents.Open(path+'\\input\\'+i)
docx.SaveAs("{}.pdf".format(path+'\\output\\'+i[:-5]),17)
print("{}.pdf".format(path+'\\output\\'+i[:-5])+" OK!")
docx.Close()
word.Quit()
沒有留言:
張貼留言