In your case, the pdf2image library is the best option in Python.
You can install it by the pip:
pip install pdf2image
Once you have installed you can use the following code to get images:
from pdf2image import convert_from_path
pages = convert_from_path('pdf_file', 500)
For saving the pages in jpeg format, you can refer to the below code:
for page in pages:
page.save('out.jpg', 'JPEG')