I have collected many unique JPEG files and compiled them into a single ~1000-page PDF file via Python. Each unique image occupies a single page within the PDF file. 
Now, I would like to go back and add functionality to my Python script so that each image has an integer stamped onto it and is searchable via ctrl+f after processing. For example, after processing via Python, page 15 within the PDF file has image 345 stamped to it. If I open the PDF file and searched for number 345, page 15 would be found.
What is Pythonic method to accomplish this task?
You can add a text, or a label to the image in the same page, so you can find it when you search for it using Ctr+F
Finding image via ctrl+f via Python