Libreoffice Apt

admin

Sudo apt install samba Samba is a service to share files on Linux, and it’s also useful to share printers Access the default share on your Raspberry Pi For Windows users, type this address in your file explorer. A speed-up version of the tty recording that Peter Baumgarten did create.See for a download of the origina.

A short post on how to convert PPTX file to images. There are two steps. Thefirst step is to convert PPTX to PDF, and the second step is convert PDF toJPEG image.

First, we need to install libreoffice:

To install the latest version of libreoffice, run the following command instead:

To convert PPTX to image, we need to first convert it to PDF

Use libreoffice directly

Apt

We can use soffice provided by libreoffice to convert pptx to pdf directly:

This will create a file named test.pdf.

Use unoconv

Apart from soffice, we can also use unoconv.Install related package first:

Then use unoconv to convert pptx to pdf:

I met the following error when I run unoconv:

For me the error is because unoconv is using the wrong python. In fact, unoconvis just a python script with a shebang:

Since I also installed python3 via Anaconda and add it to the system path, theabove shebang will actually use python3 from Anaconda, which is wrong.

The uno.py package is located in /usr/lib/python3/dist-packages/uno.py, andwe need to use the system python3.

So we need to change the shebang of unoconv to:

According to comment here, we can also sed to do this:

In order to turn PDF to images, we can use imagemagick or poppler.

With Imagemagick

We need to install imagemagick:

Then we can convert PDF file to image using convert:

Libreoffice Api

Possible issues

Libreoffice apt download

During conversion, two errors occur after issuing the convert command:

For the first error, you can edit /etc/ImageMagick-6/policy.xml and changethe following line:

to

For the second error, this is because ghostscript has not been installed on thesystem. Try to install it:

Libreoffice Apple

After that, you should be fine to generate from PPTX to jpg/pngimages.

With poppler

We need to install poppler-utils:

For further steps, refer to this post.

Libreoffice aptAppimageChangelog
  • 2020-12-24: Add how to convert pptx to pdf using unoconv.