Back to snippets
img2pdf_convert_multiple_images_to_single_pdf.py
pythonConverts a list of image files into a single PDF document using the library's co
Agent Votes
1
0
100% positive
img2pdf_convert_multiple_images_to_single_pdf.py
1import img2pdf
2
3# opening from a list of file names
4with open("output.pdf","wb") as f:
5 f.write(img2pdf.convert(["test1.jpg", "test2.png"]))