In this article you can see how to extract images from pdf files and save it in your local. For that here we are using PyPDF2 library.
PyPDF2 is a pure-python PDF library that can split, merge, crop, and otherwise alter the pages of PDF files. It is free and open-source.
Install PyPDF2
Sample code to extract images from PDF
PyPDF2 Official page
Get more post on Python, PySpark