les noms de fichiers sont numérotés avec du padding maintenant

This commit is contained in:
Francois Pelletier 2023-02-11 23:29:09 -05:00
parent 46554aadd0
commit 4f6f49e313

View file

@ -72,7 +72,7 @@ def convert_pdf(filename, filetype, output_path, resolution=300):
img.alpha_channel = 'remove'
image_filename = os.path.splitext(os.path.basename(filename))[0]
image_filename = f'{image_filename}-{i}.{filetype}'
image_filename = f'{image_filename}-{i:03}.{filetype}'
image_filename = os.path.join(output_path, image_filename)
img.save(filename=image_filename)