This Python script converts each page of a PDF document into separate image files. It utilizes the PyMuPDF library (fitz
) to handle PDF operations and the Python Imaging Library (PIL
) for image processing.
Make sure you have the required dependencies installed:
pip install PyMuPDF pillow
python pdf_to_images.py
Make sure to customize the pdf_path
and output_folder
variables in the script according to your PDF file location and desired output folder.
if __name__ == "__main__":
pdf_path = "path/to/your/pdf/document.pdf"
output_folder = "path/to/your/output/folder"
pdf_to_images(pdf_path, output_folder)
This project is licensed under the MIT License - see the LICENSE file for details.