pprint
from PIL import Image
from pprint import pprint
import os
path = input("Path of image files : ")
ConvertedToPdfPath = input("Path of pdf : ")
file_list = os.listdir(path)
#pprint(file_list)
img_list = []
k = 0
for i in file_list:
k += 1
if k%100==0:
print("진행상황 : "+str(k)+'/'+str(len(file_list)))
img = Image.open(path+"\\"+str(i))
img_1 = img.convert('RGB')
img_list.append(img_1)
img_1.save(ConvertedToPdfPath+'\\ConvertedToPdf.pdf',save_all=True, append_images=img_list)
print("완료되었습니다.")
'파일 관리 - 이미지 처리 - pdf' 카테고리의 다른 글
exe 실행파일 만들기 (0) | 2022.10.09 |
---|---|
Pillow 총 정리 (0) | 2022.10.09 |
픽셀과 dpi (0) | 2022.10.08 |
img2pdf, os.path (0) | 2022.10.08 |
자작 1) 양면 합치기 /좌우바꿈(일본만화식)/ (0) | 2022.10.08 |
.zip 파일 다루기 (0) | 2022.10.08 |
캡처 매크로 (0) | 2022.10.05 |
zip to pdf ( img2pdf, zipfile, os, glob, shutil ) (0) | 2022.09.23 |
댓글