【python 批量将PPT中各种东西保存为图片 没有水印】

# 安装

pip install Aspose.Slides==24.12.0

# 代码(没有水印,亲测可用!!)

使用导出md为中介,巧妙!但是不能导出整张无水印的幻灯片!

python 复制代码
import aspose.slides as slides

ppt_path = r"xxx.pptx"
out_dir = "save"


with slides.Presentation(ppt_path) as pres:
    # Create Markdown creation options
    md_options = slides.export.MarkdownSaveOptions()
    # Set parameter for render all items (items that are grouped will be rendered together).
    md_options.export_type = slides.export.MarkdownExportType.VISUAL
    # Set folder name for saving images
    md_options.images_save_folder_name = "md-images"
    # Set path for folder images
    md_options.base_path = out_dir

    # Save presentation in Markdown format
    pres.save(out_dir + "/pres.md", slides.export.SaveFormat.MD, md_options)

图片都保存在 save/md-images文件夹中

相关推荐
markfeng826 分钟前
Python+Django+H5+MySQL项目搭建
python·django
GinoWi1 小时前
Chapter 2 - Python中的变量和简单的数据类型
python
JordanHaidee1 小时前
Python 中 `if x:` 到底在判断什么?
后端·python
ServBay1 小时前
10分钟彻底终结冗长代码,Python f-string 让你重获编程自由
后端·python
闲云一鹤2 小时前
Python 入门(二)- 使用 FastAPI 快速生成后端 API 接口
python·fastapi
Rockbean3 小时前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
曲幽3 小时前
FastAPI + Ollama 实战:搭一个能查天气的AI助手
python·ai·lora·torch·fastapi·web·model·ollama·weatherapi
用户60648767188964 小时前
国内开发者如何接入 Claude API?中转站方案实战指南(Python/Node.js 完整示例)
人工智能·python·api
只与明月听5 小时前
RAG深入学习之Chunk
前端·人工智能·python
用户8356290780516 小时前
自动化文档处理:Python 批量提取 PDF 图片
后端·python