In the code below, I would like to add some text between each image. It looks like the final line is just appending them together so I am struggling to add the text between each image (in a loop). Thanks.
def merge_into_pdf(paths, name):
list_image = []
# Create list of images from list of path
for i in paths:
list_image.append(Image.open(f'''Images/{i}''').convert("RGB"))
# merge into one pdf
if len(list_image) == 0:
return
# get first element of list and pop it from list
img1 = list_image[0]
list_image.pop(0)
# append all images and save as pdf
img1.save(f"{name}.pdf",save_all=True, append_images=list_image)