- To execute the code, run the following command:
python3 pdf-to-image.py --pdf {PATH}
- Replace
{PATH}
with the path of the pdf e.g.
python3 pdf-to-image.py --pdf pdf/sample.pdf
- Then, a directory with all the images in the pdf is created
*This source code is referring from this website.