天天看点

pptx格式复制一张幻灯片_如何在Linux命令行上将.pptx幻灯片转换为.jpg或.png图像?...

pptx格式复制一张幻灯片

How to convert .pptx slides to .jpg or .png images on Linux in command line?

如何在Linux命令行上将.pptx幻灯片转换为.jpg或.png图像?

This following method works best for me.

以下方法最适合我。

First, convert .pptx file to .pdf using libreoffice:

首先,使用libreoffice将.pptx文件转换为.pdf:

libreoffice --headless --convert-to pdf file.pptx
           

--headless

makes libreoffice run in batch mode and not start the GUI. The pdf file will be named file.pdf by replacing the .pptx with .pdf in the original file name.

--headless

使libreoffice以批处理模式运行,而不启动 GUI。 通过将原始文件名中的.pptx替换为.pdf,将pdf文件命名为file.pdf。

Second, convert .pdf file to .jpg using convert:

其次,使用convert将.pdf文件转换为.jpg:

convert -density 400 -resize 3000^ file.pdf file%d.jpg
           

-resize 3000^

specifies the width in px of the image files. .jpg images will be named file0, file1, file2, … numbered following the slide numbers.

-resize 3000^

以像素为单位指定图像文件的宽度。 .jpg图像将被命名为file0,file1,file2,…,并在幻灯片编号之后编号。

Answered by Eric Z Ma. 埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-convert-pptx-slides-to-jpg-or-png-images-on-linux-in-command-line/

pptx格式复制一张幻灯片