Note: This repository inlcuding script was created using strategic prompting on Gemini
and ChatGPT o1
, starting with zero-shot, then few-shot, and refining through iteration.
EasyPDF2Image is a simple Python script that converts PDF files into image formats like PNG or JPEG. This tool makes it easy to turn each page of a PDF into separate image files, which can be useful for presentations, sharing, or archiving.
I created EasyPDF2Image to help my colleague who was manually converting PDF files to images by taking screenshots of each page. This method was time-consuming and not very efficient. Additionally, my colleague did not want to upload sensitive PDF files to online services because of confidentiality concerns.
To solve these problems, I developed this script to allow quick conversion of PDF files to images directly on a local computer. This way, all data remain private and safe.
- Convert Multiple PDFs: Process several PDF files at once by placing them in the
input
folder. - Choose Image Format: Select between PNG and JPEG formats for the output images.
- Organized Output: All images are saved in the
output
folder with clear names likedocument_page_1.png
. - Local Processing: Converts files on your computer without needing an internet connection, ensuring your data stays private.
- Easy to Use: Simple command-line prompts guide you through the conversion process.
Follow these steps to set up EasyPDF2Image on your local machine:
Open your terminal or command prompt and run:
git clone https://github.com/siddqamar/EasyPDF2Image.git
cd EasyPDF2Image
It's a good practice to use a virtual environment to manage project dependencies.
python -m venv venv
venv\Scripts\activate
Install the required Python packages using pip
:
pip install -r requirements.txt