In this article, we cover how to convert PPT or PPTX to PDF in Ubuntu. PPTX is a default file format in Microsoft PowerPoint 2007 or newer versions. Versions prior to 2007 saved the file as PPT. Here, X shows that files are saved in XML format that doesn’t contain macros.
On the other hand, we have PDF (or, Portable Document Format) created by Adobe.
If we want to convert PPT or PPTX to PDF then, we can easily get it done through LibreOffice Impress GUI application. This would work well if there are couple of files we have to convert. But, first install LibreOffice Impress.
Note: Following operations require superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.
Install LibreOffice Impress in Ubuntu
The package is available through standard Ubuntu repository therefore, update the repository first –
sudo apt update
Next, to install LibreOffice Impress –
sudo apt install libreoffice-impress
Convert a single PPT or PPTX file to PDF through LibreOffice Impress
The functionality to convert PPT or PPTX to PDF is builtin feature in LibreOffice Impress. Just open the PPT or PPTX file through LibreOffice Impress application and head to File in menu bar.
File --> Export As --> Export as PDF
and, follow onscreen instructions to convert the PPT or PPTX file to PDF.
What we have covered just now works best if there are couple of files involved. But, what if there are several of those we need to convert. In that case, doing it through a GUI application isn’t worth the time and effort.
Convert multiple PPT or PPTX files to PDF through loimpress command
The command-line tool loimpress is made available through LibreOffice Impress package (package installation steps covered above are enough to make the utility available). Use the following syntax to convert the PPT/PPTX files to PDF –
loimpress --convert-to pdf --outdir [output-directory] input-ppt-pptx-file
For instance, if we have a test.pptx which we want to convert to test.pdf. Output directory for test.pdf – /home/techpiezo/Documents/
loimpress --convert-to pdf --outdir /home/techpiezo/Documents/ test.pptx
To convert multiple files, the above command would now be –
loimpress --convert-to pdf --outdir /home/techpiezo/Documents/ *.pptx
Replace, *.pptx with *.ppt in case there are PPT files.
In conclusion, we have covered here how to convert PPT or PPTX files to PDF in Ubuntu here.