pdf2gif
A Python library and command-line tool for converting PDF files to animated GIFs with customizable frame delays and slide multipliers.
Features
- 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
Installation
From PyPI (Recommended)
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)
Windows Explorer Send-To
Read here how to integrate pdf2gif in the Windows Explorer right-click menu.
Usage
Windows Explorer Send-To
On Windows, just right-click on a PDF-file, select "Send To" and "Convert PDF to GIF"
Command Line Interface
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 3
Command Line Options
pdf_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)
Python Library
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}")
License
This project is licensed under the BSD-3 License - see the LICENSE file for details.
Acknowledgments
- pdf2image for PDF to image conversion
- stackview for GIF animation creation
- Pillow for image processing
- NumPy for array operations
Troubleshooting
Common Issues
- "poppler not found" error: Install poppler utilities (see Dependencies section)
- Memory issues with large PDFs: Consider processing PDFs with fewer pages or lower resolution
Getting Help
- Check the Issues page
- Create a new issue with detailed error information
- Include your operating system and Python version
Metadata
Release files for pdf2gif 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdf2gif-0.1.0.tar.gz | 8.5 kB | Without provenance | Details for pdf2gif-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdf2gif-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pdf2gif-0.1.0-py3-none-any.whl |
Total release size: 14.0 kB
Release files / pdf2gif-0.1.0.tar.gz
| Download URL | pdf2gif-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c601a7517dfecfa2b357aca1c0c75f8adb66761e8dc13476a1e25fb61c78a56
|
|
BLAKE2b-256 checksum How to use checksums |
f208ec6c6ae8a0ae9ff86b712d7cf094ce63103c6337baf2a7559f449ac59331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / pdf2gif-0.1.0-py3-none-any.whl
| Download URL | pdf2gif-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f73df6983eb2ace48c712f8866c8701279372e09441c6eba3b794c30af0d0f3f
|
|
BLAKE2b-256 checksum How to use checksums |
49fc93b9e1be4101f61423b8b165711477e9f488ffe926a620be54ac988c21b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for pdf2gif 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.