Last active
April 16, 2021 13:53
-
-
Save NbtKmy/fe4d8cbac88571a73790f2f2426cd08e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
from PIL import Image | |
if __name__ == "__main__": | |
im_list = [] | |
for i in os.listdir('./img'): | |
filename = './img/' + i | |
imgs = Image.open(filename) | |
im_list.append(imgs) | |
pdf1_filename = "output.pdf" | |
im_list[0].save(pdf1_filename, "PDF" ,resolution=100.0, save_all=True, append_images=im_list[1:]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment