A JPG is a series of dots. There is nothing you can search for if it was a picture of the Constitution, a cute picture of a puppy, or the pimple on somebody's backside.
Just converting a JPG into a PDF (Portable Document File, IE. an Acrobat Reader open-able file) does not make the text of that document, the puppy, or that pimple, any easier to search for. It is just another way of assembling the dots into something open-able by Acrobat reader, or anything else.
If you were to run that picture through an OCR (Optical Character Reader) type of program, and IF that program was able to figure out the dot patterns of some text, and if then you saved that error-prone take of what the OCR program may have figured out, then perhaps the resulting file may be usable for your means.
Now, here is a possibility of what you may have seen. A JPG file, and a few other picture formats also, can have meta-data recorded in the designated portions of the picture file. It is not a part of the actual picture, it is a part of the unseen data that might also ride along with the whole file. That meta-data, which could be recorded in either the EXIF fields, or the IPTC fields. Those fields have sub-fields where a person can record tags and keywords of the accompanying picture. It is up to the photographer of some user, grunt, or librarian to type in those tags and keywords. Those manually entered fields are then search-able. But it would only be within the ability of that person to enter in what that person deems pertinent into the meta-data. If they are lazy, or if they misspelled the words then you may still not find the text you are looking for.