Loading...
Loading...
Convert PDF to PowerPoint presentations
npx skill4agent add dnvriend/pdf-to-pptx-tool skill-pdf-to-pptx-toolpdf-to-pptx-tool# Clone the repository
git clone https://github.com/dnvriend/pdf-to-pptx-tool.git
cd pdf-to-pptx-tool
# Install globally with uv
uv tool install .popplerbrew install popplerapt-get install poppler-utils# Basic conversion
pdf-to-pptx-tool convert document.pdf slides.pptx
# High quality (300 DPI)
pdf-to-pptx-tool convert report.pdf presentation.pptx --dpi 300
# With verbose logging
pdf-to-pptx-tool -v convert input.pdf output.pptxpdf-to-pptx-tool convert INPUT_PDF OUTPUT_PPTX [OPTIONS]INPUT_PDFOUTPUT_PPTX.pptx--dpi INTEGER-v, --verbose-v-vv-vvv# Example 1: Basic conversion (default 200 DPI)
pdf-to-pptx-tool convert quarterly-report.pdf q4-presentation.pptx
# Example 2: High quality for detailed diagrams
pdf-to-pptx-tool convert technical-diagram.pdf slides.pptx --dpi 300
# Example 3: Lower quality for quick preview
pdf-to-pptx-tool convert draft.pdf preview.pptx --dpi 150
# Example 4: With INFO logging to see progress
pdf-to-pptx-tool -v convert large-doc.pdf output.pptx
# Example 5: With DEBUG logging for troubleshooting
pdf-to-pptx-tool -vv convert problematic.pdf fixed.pptx
# Example 6: Batch conversion with shell loop
for pdf in *.pdf; do
pdf-to-pptx-tool convert "$pdf" "${pdf%.pdf}.pptx"
donepdf-to-pptx-tool completion SHELLSHELLbashzshfish# Generate bash completion
eval "$(pdf-to-pptx-tool completion bash)"
# Generate zsh completion
eval "$(pdf-to-pptx-tool completion zsh)"
# Generate fish completion
pdf-to-pptx-tool completion fish | source
# Save to file for permanent installation
pdf-to-pptx-tool completion bash > ~/.pdf-to-pptx-tool-completion.bash
echo 'source ~/.pdf-to-pptx-tool-completion.bash' >> ~/.bashrc| Flag | Level | Output | Use Case |
|---|---|---|---|
| (none) | WARNING | Errors/warnings only | Production, quiet mode |
| INFO | + Operations, progress | Normal debugging |
| DEBUG | + Detailed steps, file sizes | Development, troubleshooting |
| TRACE | + Library internals (pdf2image, PIL, pptx) | Deep debugging |
# Quiet mode - only see errors
pdf-to-pptx-tool convert input.pdf output.pptx
# INFO - see conversion progress
pdf-to-pptx-tool -v convert input.pdf output.pptx
# Output:
# [INFO] Starting PDF to PPTX conversion
# [INFO] Converting input.pdf to output.pptx (DPI: 200)
# [INFO] Converting PDF pages to images...
# [INFO] Converted 5 pages
# [INFO] Creating PowerPoint presentation...
# [INFO] Saving presentation to output.pptx
# DEBUG - see detailed processing
pdf-to-pptx-tool -vv convert input.pdf output.pptx
# Additional output:
# [DEBUG] Input: input.pdf, Output: output.pptx, DPI: 200
# [DEBUG] Validating input file: input.pdf
# [DEBUG] Input file size: 2.45 MB
# [DEBUG] Using DPI setting: 200
# [DEBUG] Processing slide 1/5
# [DEBUG] Output file size: 8.23 MB
# TRACE - see library internals
pdf-to-pptx-tool -vvv convert input.pdf output.pptx
# Shows pdf2image, PIL, and pptx library debug messages| DPI | Quality | File Size | Best For |
|---|---|---|---|
| 72 | Low | Smallest | Quick previews, draft slides |
| 150 | Medium | Small | Web presentations, email |
| 200 | Good | Medium | Default - recommended for most |
| 300 | High | Large | Print quality, detailed diagrams |
| 600 | Very High | Very Large | Professional print, posters |
# Convert all PDFs in directory
for pdf in *.pdf; do
echo "Converting $pdf..."
pdf-to-pptx-tool convert "$pdf" "${pdf%.pdf}.pptx"
done
# With custom DPI
for pdf in *.pdf; do
pdf-to-pptx-tool convert "$pdf" "${pdf%.pdf}.pptx" --dpi 300
done
# With error handling
for pdf in *.pdf; do
if pdf-to-pptx-tool -v convert "$pdf" "${pdf%.pdf}.pptx"; then
echo "✓ Converted $pdf"
else
echo "✗ Failed to convert $pdf"
fi
done# Bash - add to ~/.bashrc
eval "$(pdf-to-pptx-tool completion bash)"
# Zsh - add to ~/.zshrc
eval "$(pdf-to-pptx-tool completion zsh)"
# Fish - save to completions directory
mkdir -p ~/.config/fish/completions
pdf-to-pptx-tool completion fish > ~/.config/fish/completions/pdf-to-pptx-tool.fishpdf-to-pptx-tool <TAB>pdf-to-pptx-tool convert --<TAB># Symptom
RuntimeError: Failed to convert PDF pages: poppler not found# macOS
brew install poppler
# Ubuntu/Debian
sudo apt-get install poppler-utils
# Fedora
sudo dnf install poppler-utils
# Verify installation
pdftoppm -v# Symptom
✗ Error: Input PDF file not found: document.pdf# Check file exists
ls -l document.pdf
# Use absolute path
pdf-to-pptx-tool convert /full/path/to/document.pdf output.pptx# Symptom
Generated 50MB PPTX from 2MB PDF# Try lower DPI
pdf-to-pptx-tool convert input.pdf output.pptx --dpi 150
# Or use default 200 DPI
pdf-to-pptx-tool convert input.pdf output.pptx# Symptom
Text and diagrams appear pixelated# Use higher quality
pdf-to-pptx-tool convert input.pdf output.pptx --dpi 300
# For print quality
pdf-to-pptx-tool convert input.pdf output.pptx --dpi 600# Symptom
Large PDF takes minutes to convertpdf-to-pptx-tool -vv convert large.pdf output.pptxpdf-to-pptx-tool convert large.pdf output.pptx --dpi 150# Symptom
PermissionError: [Errno 13] Permission denied: 'output.pptx'# Write to home directory
pdf-to-pptx-tool convert input.pdf ~/output.pptx
# Or create directory first
mkdir -p output-dir
pdf-to-pptx-tool convert input.pdf output-dir/output.pptx# Tool help
pdf-to-pptx-tool --help
# Command help
pdf-to-pptx-tool convert --help
# Completion help
pdf-to-pptx-tool completion --help
# Version info
pdf-to-pptx-tool --version# 1. Check file exists and is readable
ls -lh document.pdf
file document.pdf
# 2. Verify poppler is installed
pdftoppm -v
# 3. Try with DEBUG logging
pdf-to-pptx-tool -vv convert document.pdf test.pptx
# 4. Try with lower DPI if memory issues
pdf-to-pptx-tool -vv convert document.pdf test.pptx --dpi 150
# 5. Check Python and dependencies
python --version
pdf-to-pptx-tool --version01# Success
✓ Successfully converted document.pdf to slides.pptx
# Error
✗ Error: Input PDF file not found: document.pdf[INFO] Starting PDF to PPTX conversion
[INFO] Converting document.pdf to slides.pptx (DPI: 200)
[DEBUG] Input file size: 2.45 MB
[INFO] Converted 10 pages
[DEBUG] Output file size: 12.78 MB
[INFO] Conversion completed successfully-vv