From ppt to pdf

01 March 2019  

pdftk, LibreOffice  

The graphical summary of the post could be:

Story

Yesterday during the group meeting at work, a colleague reminded me a nice story that I hold him but had totally forgotten since then.

Some years ago, I had to prepare a presentation for a talk, as usual, did it in LaTeX. It was a nice one, so my boss at that time asked if I could send him the ppt. The what? Yes, the file in powerpoint format. I did not use that for many years so that was kind of a surprise. I told him:

Sorry, I prepared it in LaTeX, so I can only send a pdf file (or the LaTeX source).

But he told me:

No, send me the ppt, so I can use it for my own presentations.

You imagine, in such a situation, there is not a lot of time to think, you need action!

The solution

Let’s be clear: I’m not proud at all of that, but as Max Holloway says: “it is what it is”.

1. Turn the pdf into

Get the PDFtk toolkit and run the following command on your pdf:

pdftk input.pdf burst

You obtain a series of pdf named: pg_0001.pdf, pg_0002.pdf, …

2. Convert the pages into jpg

Here we use the convert tool, which comes with ImageMagick. You can loop on the files and apply the conversion on each of them, with something like:

for ii in $(ls pg_*.pdf); do
  outputfile=$(basename ${ii} '.pdf')".jpg"
  echo ${ii} "-->" ${outputfile}
  convert -density 300 ${ii} ${outputfile}
done

Note that the density (here: 300) can be modified to increase or decrease the quality of the jpg images.

3. Add the images into the presentation

As I only have LibreOffice installed, I will show how to do with it with Impress.
The solution is to add a media which is a photo album, and then add the photos from the album into the presentation.

LibreOffice Photo Album

From ppt to pdf

Conclusions

Sometimes you are asked to do things that maybe don’t make sense, but if you don’t want to argue, it is necessary comply. In this case we fulfilled our goal, ending up with a ppt, but it’s almost impossible to edit it, as there are only images.