A Python library and command-line tool for converting PDF files to animated GIFs with customizable frame delays and slide multipliers.
- Convert PDF files to animated GIFs
- Customizable frame delay (in milliseconds)
- Configurable first slide multiplier (repeats the first slide multiple times)
- Automatic downsampling for better performance
- Simple command-line interface
- Python library for programmatic use
- Windows Explorer integration with right-click context menu
pip install pdf2gif- Poppler installation as required by
pdf2imagefor PDF processing- Windows: Download from poppler releases
- macOS:
brew install poppler - Linux:
sudo apt-get install poppler-utils(Ubuntu/Debian) orsudo yum install poppler-utils(CentOS/RHEL)
Read here how to integrate pdf2gif in the Windows Explorer right-click menu.
On Windows, just right-click on a PDF-file, select "Send To" and "Convert PDF to GIF"
The simplest way to use pdf2gif is through the command line:
# Basic usage
pdf2gif presentation.pdf
# Custom frame delay (200ms)
pdf2gif document.pdf --frame-delay 200
# Custom first slide multiplier (5 times)
pdf2gif slides.pdf --first-slide-multiplier 5
# Both custom parameters
pdf2gif slides.pdf --frame-delay 100 --first-slide-multiplier 3pdf_filename: Path to the input PDF file (required)--frame-delay: Frame delay in milliseconds (default: 150)--first-slide-multiplier: Number of times to repeat the first slide (default: 10)
You can also use pdf2gif as a Python library:
from pdf2gif import convert_pdf_to_gif
# Basic conversion
gif_path = convert_pdf_to_gif("presentation.pdf")
# Custom parameters
gif_path = convert_pdf_to_gif(
"document.pdf",
frame_delay=200,
first_slide_multiplier=5
)
print(f"GIF created at: {gif_path}")This project is licensed under the BSD-3 License - see the LICENSE file for details.
- pdf2image for PDF to image conversion
- stackview for GIF animation creation
- Pillow for image processing
- NumPy for array operations
- "poppler not found" error: Install poppler utilities (see Dependencies section)
- Memory issues with large PDFs: Consider processing PDFs with fewer pages or lower resolution
- Check the Issues page
- Create a new issue with detailed error information
- Include your operating system and Python version