# 安装
pip install Aspose.Slides==24.12.0
# 代码(没有水印,亲测可用!!)
使用导出md为中介,巧妙!但是不能导出整张无水印的幻灯片!
import aspose.slides as slidesppt_path = r"xxx.pptx"
out_dir = "save"with slides.Presentation(ppt_path) as pres:# Create Markdown creation optionsmd_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 imagesmd_options.images_save_folder_name = "md-images"# Set path for folder imagesmd_options.base_path = out_dir# Save presentation in Markdown formatpres.save(out_dir + "/pres.md", slides.export.SaveFormat.MD, md_options)
图片都保存在 save/md-images 文件夹中