linux环境下ppt转换为pptx

执行:

pip3 install aspose.slides

安装aspose库,转换代码如下所示:


import aspose.slides as slides
import aspose.pydrawing as drawing

with slides.Presentation("presentation.ppt") as presentation:
    presentation.save("presentation.pptx", slides.export.SaveFormat.PPTX)

1、如果报错:

libpython3.7m.so.1.0: cannot open shared object file

则使用find命令查找libpython3.7m.so.1.0文件,并将其拷贝到/lib64目录下,之后执行ldconfig

2、如果报错:

Couldn't find a valid ICU package installed on the system.

则需要执行:

yum install libicu -y

3、如果报错:

Unable to load shared library 'libgdiplus' or one of its dependencies.

则需要执行:

yum install epel-release -y
yum install libgdiplus -y

你可能感兴趣的:(linux,powerpoint,运维)