Skip to content

Instantly share code, notes, and snippets.

Created Dec 29, 2019
What would you like to do?
Merge all your jpg files into a single PDF
import img2pdf
import os
current_path = os.getcwd()
with open("output.pdf", "wb") as f:
f.write(img2pdf.convert([i for i in os.listdir(current_path) if i.endswith(".jpg")]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment