网络编程
位置:首页>> 网络编程>> Python编程>> 如何使用python把ppt转换成pdf

如何使用python把ppt转换成pdf

作者:海底苍鹰  发布时间:2022-09-20 14:27:14 

标签:python,ppt转换,pdf

ppt要想完美的转pdf,图片,还是需要在windows下面来操作。

1,安装python3.5.1

下载地址

Windows x86-64 executable installer,windows下64位安装程序

安装界面,选中加入环境变量。这样就不用手动去加环境变量了。

2,安装pip

下载地址

pip-10.0.1.tar.gz,解压后,在解压的根目录下执行以下命令。


python setup.py install


3,安装python包




pip install PyWin32 Pillow reportlab

4,下载ppt2pdf程序

git clone

5,ppt转图片,pdf


C:\PPT2PDF-master>python PPT2PDF.py test.pptx test.pdf
test
水印完成
准备生成C:\PPT2PDF-master\test_tank测试.pdf
C:\PPT2PDF-master\test_tank测试\幻灯片1.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片2.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片3.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片4.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片5.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片6.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片7.PNG
C:\PPT2PDF-master\test_tank测试\幻灯片8.PNG
完成PDF合成

在这里要注意的是,下载下来的文件编码是utf8,不要改变文件的编码格式,不然会报错。

来源:http://blog.51yip.com/other/1934.html

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com