def convertToImage(files): for file in files: #print(file) images = convert_from_path(file,500,strict=False) for i, image in enumerate(images):