How to convert pptx files to jpg or png (for each slide) on linux?

前端 未结 3 1604
一整个雨季
一整个雨季 2020-12-13 16:44

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

相关标签:
3条回答
  • 2020-12-13 17:07

    Not sure about libreoffice, but afaik its the only program to deal with pptx files.

    I found this http://ask.libreoffice.org/en/question/23851/converting-pptx-to-pdf-issue/

    If you have pdfs you can use imagemagick to output any quality pictures

    0 讨论(0)
  • 2020-12-13 17:15

    After Installing unoconv and LibreOffice you can use:

    unoconv --export Quality=100 filename.pptx filename.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 
    

    to receive the images.

    0 讨论(0)
  • 2020-12-13 17:24

    Convertion PPTX to PNG/JPG

    This solution requires LibreOffice ( soffice ) and Ghostscript ( gs )

    sudo apt install libreoffice ghostscript
    

    Then two steps:

    1. PPTX -> PDF
    soffice --headless --convert-to pdf prezentacja.pptx
    
    1. PDF -> PNG/JPG
    gs -sDEVICE=pngalpha -o slajd-%02d.png -r96 prezentacja.pdf
    
    • -o slajd-%02d.png - output to file, %02d slajd number, two digits
    • -r96 - resolution:
      • 96 -> 1280x720
      • 144 -> 1920x1080
    0 讨论(0)
提交回复
热议问题