我想将PowerPoint演示文稿转换为多张图像.我已经在服务器上安装了LibreOffice,将docx转换为pdf没问题.将pptx转换为pdf无效.我使用以下命令行:
I want to convert a powerpoint presentation to multiple images. I already installed LibreOffice on my server and converting docx to pdf is no problem. pptx to pdf conversion does not work. I used following command line:
libreoffice --headless --convert-to pdf filename.pptx是否可以立即将pptx转换为png,还是必须先将其转换为pdf,然后再使用ghostscript或其他方式?
Is there es way to convert pptx to pngs immediately or do I have to convert it to pdf first and then use ghostscript or something?
那质量设置呢?有没有办法选择最终图像的分辨率?
And what about the quality settings? Is there a way to choose the resolution of the resulting images?
提前谢谢!
根据此链接,我能够使用简单的命令行将pdf转换为图像:
According to this link I was able to convert a pdf to images with the simple command line:
convert <filename>.pdf <filename>.jpg(我想您需要LibreOffice和ImageMagick,但不确定-在我的服务器上工作)
(I guess you need LibreOffice and ImageMagick for it but not sure about it - worked on my server)
但是pptx到pdf转换仍然存在问题.
But there are still the problems with the pptx-to-pdf convert.
由于使用了谷歌搜索功能和塞巴斯蒂安·海因(Sebastian Heyn)的帮助,我能够使用此行创建一些高质量图像:
Thanks to googling and Sebastian Heyn's help I was able to create some high quality images with this line:
convert -density 400 my_filename.pdf -resize 2000x1500 my_filename%d.jpg使用后请耐心等待-您仍然可以在unix控制台中键入soemthing,但正在处理中.只需等待几分钟,即可创建jpg文件.
Please be patient after using it - you still can type soemthing into the unix console but it's processing. Just wait a few minutes and the jpg files will be created.
有关选项的更多信息,请查看此链接
For further information about the options check out this link
P.S.:pptx文件的宽高比似乎不完全是4:3,因为生成的图像尺寸为1950x1500
P.S.: The aspect ratio of a pptx file doesn't seem to be exactly 4:3 because the resulting image size is 1950x1500
推荐答案在安装unoconv和LibreOffice之后,您可以使用:
After Installing unoconv and LibreOffice you can use:
unoconv --export Quality=100 filename.pptx filename.pdf可以将您的演示文稿转换为pdf.有关其他选项,请此处.
to convert your presentation to a pdf. For further options look here.
之后,您可以-如上所述-使用:
Afterwards you can - as already said above - use:
convert -density 400 my_filename.pdf -resize 2000x1500 my_filename%d.jpg接收图像.
更多推荐
如何在Linux上将pptx文件转换为jpg或png(对于每张幻灯片)?
发布评论