04-01-2022, 10:34 PM
(04-01-2022, 08:41 PM)Ofnuts Wrote:(04-01-2022, 04:41 AM)PixLab Wrote: you should have something alikeThis programming teacher says that there is a big bug in the making, because you are assuming that images and image_ids have the same length, and this can become false later on (for instance if you filter ilages on type/name/whatever).
images = gimp.image_list()
images_ids = [img.ID for img in images]
pdb.file_pdf_save_multi(len(images), images_ids, False, False, False, filename, filename)
That can be a bug. I will switch to len(image_ids) and image_ids=[image_id for image_id in image_ids if image_id is not none]
Although in my case it shouldn’t make any difference. The reason is I will always apply same set of operations on all valid open pages and no pages will be deleted