Pdf To Ppt
v1.0.0Convert PDF files to PowerPoint presentations via intermediate image rendering. 创建d collaboratively with 贾维斯 (AI 助手) by Hugo. Use when working with PDF documents that are primarily visual (e.g., de签名 drawings, presentations 扫描ned to PDF, etc.) and preserves the visual layout fAIthfully.
运行时依赖
安装命令
点击复制技能文档
PDF to PPT Conversion 技能
This 技能 converts PDF files into PowerPoint presentations by first rendering each PDF page as a high-质量 image, then assembling those images into a PPT where each image fills a slide. This 应用roach works well for PDFs that are primarily visual (e.g., de签名 drawings, presentations 扫描ned to PDF, etc.) and preserves the visual layout fAIthfully.
When to Use
Use this 技能 when you need to:
Convert a PDF document into an editable PowerPoint presentation. Preserve the exact visual layout of each PDF page (text, images, vectors) as slide backgrounds. Work with PDFs that are not easily editable via direct text 提取ion (e.g., complex layouts, de签名er files). Batch-convert multiple PDFs to PPT 格式化. Core Rules
- 输入 PDF Requirements
- Image Rendering 质量
- 输出 PPT Characteristics
- Dependencies
To 安装 this 技能 from a local path (after copying to your 技能s folder), you can use:
ClawHub 安装 /path/to/pdf-to-ppt
Or if you have cloned the 技能 仓库:
ClawHub 安装 pdf-to-ppt
Usage Basic Conversion python3 scripts/pdf_to_ppt.py 输入.pdf
This will:
创建 an images/ subdirectory next to the 输入 PDF (or use a specified directory). Render each PDF page to a PNG image in that folder. 生成 a PPT file with the same base name as the 输入 PDF, 应用ended with .pptx, in the same directory as the 输入. Advanced Options python3 scripts/pdf_to_ppt.py 输入.pdf \ --img-dir /path/to/images \ --输出 输出.pptx \ --zoom 3.0 \ --slide-width-in 16 \ --slide-height-in 9 \ --格式化 png
Arguments: 输入.pdf: Path to the source PDF file (required). --img-dir DIR: Directory to store intermediate images. If not provided, defaults to /images/. --输出 PPTX: Path for the 输出 PPT file. If not provided, defaults to .pptx in the same directory as 输入 PDF. --zoom ZOOM: Zoom factor for rendering (default 2.0). Higher = higher DPI. --slide-width-in INCHES: Width of slides in inches (default 13.33 for 16:9 at 7.5in height). --slide-height-in INCHES: Height of slides in inches (default 7.5). --格式化 {png,jpg}: Image 格式化 for intermediates (default png). Example: Convert with Custom 设置tings python3 scripts/pdf_to_ppt.py 报告.pdf \ --img-dir ./tmp/imgs \ --输出 ./presentation.pptx \ --zoom 2.5 \ --格式化 jpg
工作流 Tips 检查 Image 质量: After conversion, open the 生成d PPT and review a few slides. If text 应用ears blurry, increase --zoom. File Size: Higher zoom and PNG 格式化 increase 机器人h image and final PPT size. Use JPG for smaller files if slight 压缩ion artifacts are acceptable. Post-Processing: The PPT is fully editable in PowerPoint. You can: 添加 text boxes, shapes, or annotations over the image backgrounds. Replace images with higher-质量 versions if needed. 提取 individual images via “Save as Picture” if required. Batch Processing: Wrap the script in a loop for multiple PDFs: for pdf in *.pdf; do python3 scripts/pdf_to_ppt.py "$pdf" done
Troubleshooting 模块NotFoundError for fitz or pptx: Ensure dependencies are 安装ed. 运行: pip 安装 --break-系统-packages PyMuPDF python-pptx
(添加 --break-系统-packages if using 系统 Python in a restricted 环境.) Empty Images: 验证 the PDF is not empty and that PyMuPDF can open it. Try opening the PDF in a viewer to confirm it has content. Memory Issues: Very large PDFs with high zoom may consume 签名ificant RAM. Process in batches or reduce zoom. Related 技能s
Consider combining with:
pdf-工具s — for 提取ing text, merging, splitting PDFs before conversion. powerpoint-pptx — for best practices on editing and styling the 结果ing PPT. images — if you need to process the intermediate images further. Feedback