Discussion:
[GTALUG] Converting .pptx files to multiple .png
Bob Jonkman via talk
2016-06-20 19:12:21 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi: I've got a bunch of .pptx (Microsoft PowerPoint) files that I'd
like to convert to individual .png files for each slide, preferably
where each step in a transition becomes its own .png file.

I can export one slide at a time from LibreOffice, but I'd much rather
do it in bulk from the command line.

I can convert the whole .pptx file to .pdf and then extract each slide
with 'pdftocairo -png [filename.pdf]' but that seems clunky, and
doesn't preserve transitions as individual .png files.

Is there something to do pptx2png conversion from the command line?

- --Bob.


- --
Bob Jonkman <***@sobac.com> Phone: +1-519-635-9413
SOBAC Microcomputer Services http://sobac.com/sobac/
Software --- Office & Business Automation --- Consulting
GnuPG Fngrprnt:04F7 742B 8F54 C40A E115 26C2 B912 89B0 D2CC E5EA



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Ensure confidentiality, authenticity, non-repudiability

iEYEARECAAYFAldoQA8ACgkQuRKJsNLM5epUtQCeNbnyW75MWA9ZtHK7sLpsaBNp
/0AAn1oYqmoXJwRMohibfeaii41imtcN
=qq17
-----END PGP SIGNATURE-----
---
Talk Mailing List
***@gtalug.org
https://gtalug.org/ma
Myles Braithwaite via talk
2016-06-20 19:25:45 UTC
Permalink
Post by Bob Jonkman via talk
Hi: I've got a bunch of .pptx (Microsoft PowerPoint) files that I'd
like to convert to individual .png files for each slide, preferably
where each step in a transition becomes its own .png file.
You can use unoconv[0] (a universal office converter that works with
anything that LibreOffice or OpenOffice support) to convert them to a
pdf file. Then use ImageMagick[1] to convert them to png files.

Here is a quick script (that probably doesn't work so don't blame me if
it fails) on how I would start doing it:
<https://gist.github.com/myles/3656ebcb3026b455d1b3be52d5bd3a58>.

Hope this helps.

[0]: <https://github.com/dagwieers/unoconv>
[1]: <http://www.imagemagick.org/script/index.php>
---
Talk Mailing List
***@gtalug.org
https://gtalug.org/mailman/listin
Allan Zhang via talk
2016-06-20 19:33:25 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Try libreoffice --headless --convert-to png *.pptx




- -------- Original Message --------
From: Myles Braithwaite via talk <***@gtalug.org>
Sent: June 20, 2016 3:25:45 PM EDT
To: Bob Jonkman <***@sobac.com>, GTALUG Talk <***@gtalug.org>
Subject: Re: [GTALUG] Converting .pptx files to multiple .png
Post by Bob Jonkman via talk
Hi: I've got a bunch of .pptx (Microsoft PowerPoint) files that I'd
like to convert to individual .png files for each slide, preferably
where each step in a transition becomes its own .png file.
You can use unoconv[0] (a universal office converter that works with
anything that LibreOffice or OpenOffice support) to convert them to a
pdf file. Then use ImageMagick[1] to convert them to png files.

Here is a quick script (that probably doesn't work so don't blame me if
it fails) on how I would start doing it:
<https://gist.github.com/myles/3656ebcb3026b455d1b3be52d5bd3a58>.

Hope this helps.

[0]: <https://github.com/dagwieers/unoconv>
[1]: <http://www.imagemagick.org/script/index.php>
- ---
Talk Mailing List
***@gtalug.org
https://gtalug.org/mailman/listinfo/talk
-----BEGIN PGP SIGNATURE-----

iQI5BAEBCgAjHBxBbGxhbiBaaGFuZyA8YWxsYW5AYXppYy5jYT4FAldoRQQACgkQ
lQhQ+uFN8kPO2Q/8CVtmzArNaqUjZat+XZekxv7Q3tquIUGxxtUbUIcqOlZcAsPH
uc2OjSIzs47BUcGA/Cy+QriVINJlIsEZSag3gUsLEuseHxIZw3r4nCwxkQ7vEdO/
OyPRxDxYeYL41ISJGEs1fn+6cYeiaw8K9Xhby5BVGl+DH/m5ikar0v24iiyjDkCh
GbK7vtOQqTzLjw2TY2zosDomvb6OtvICZUfqKLWslSaLhIUcjTIsof6n1H4QTdAg
4xtwKoQL7D4c6Qi89VYtF1mfEYOpgALKSiCW7hzJWs1fmoxw2RtaFIP5ListC84H
QkgL1ZGLgvLVQYMNsvBh3ef4koNN3QscqgiAcrBITM/IgzxHVsic96F6viL4fdFr
RwDFLl5nJBuwG/jNkNzRY0eb6CHdtCKES2DOzq6ryobdThK/tPm/s7j5b5Ex1Wwt
zKbi3mf3nwA9ZyKvr2XBOhwYT7DKji/2QVMfVgE1Kjoc2tS7YdMvj4V2FyxpCzG+
jRyjxjXniK7zaRKRIsDcX9lrKhMX3X6BsPv+BcRdbzuhC05vYJmpsyJOY66cBZNX
HwYYlJeIf51FPuTr4v/IiMCj2OuYW/AqMtNiIaTUK48+orXnGH+88RHTcYwPKG3x
Cw4kmLYxc53GAOZ8cyvXV/R6oRj3rug9AW6DIXl4GaT6/sK6hWFAeA3xgEk=
=3ca6
-----END PGP SIGNATURE-----

---
Talk Mailing List
***@gtalug.org
https:
Allan Zhang via talk
2016-06-20 19:58:36 UTC
Permalink
Post by Allan Zhang via talk
Try libreoffice --headless --convert-to png *.pptx
Sorry, ignore this. This will only convert the first slide of each pptx.

You could batch convert to pdf with libreoffice --headless --convert-to pdf *.pptx and use unoconv of ImageMagick convert like Myles said.

Bob, I think this extension may be what you are looking for:
http://www.monperrus.net/martin/export+animations+to+pdf+in+libreoffice-openoffice

Hopefully it works and you are able to find a way to automate it for multiple files.
Post by Allan Zhang via talk
- -------- Original Message --------
Sent: June 20, 2016 3:25:45 PM EDT
Subject: Re: [GTALUG] Converting .pptx files to multiple .png
Post by Bob Jonkman via talk
Hi: I've got a bunch of .pptx (Microsoft PowerPoint) files that I'd
like to convert to individual .png files for each slide, preferably
where each step in a transition becomes its own .png file.
You can use unoconv[0] (a universal office converter that works with
anything that LibreOffice or OpenOffice support) to convert them to a
pdf file. Then use ImageMagick[1] to convert them to png files.
Here is a quick script (that probably doesn't work so don't blame me if
<https://gist.github.com/myles/3656ebcb3026b455d1b3be52d5bd3a58>.
Hope this helps.
[0]: <https://github.com/dagwieers/unoconv>
[1]: <http://www.imagemagick.org/script/index.php>
- ---
Talk Mailing List
https://gtalug.org/mailman/listinfo/talk
-----BEGIN PGP SIGNATURE-----
iQI5BAEBCgAjHBxBbGxhbiBaaGFuZyA8YWxsYW5AYXppYy5jYT4FAldoRQQACgkQ
lQhQ+uFN8kPO2Q/8CVtmzArNaqUjZat+XZekxv7Q3tquIUGxxtUbUIcqOlZcAsPH
uc2OjSIzs47BUcGA/Cy+QriVINJlIsEZSag3gUsLEuseHxIZw3r4nCwxkQ7vEdO/
OyPRxDxYeYL41ISJGEs1fn+6cYeiaw8K9Xhby5BVGl+DH/m5ikar0v24iiyjDkCh
GbK7vtOQqTzLjw2TY2zosDomvb6OtvICZUfqKLWslSaLhIUcjTIsof6n1H4QTdAg
4xtwKoQL7D4c6Qi89VYtF1mfEYOpgALKSiCW7hzJWs1fmoxw2RtaFIP5ListC84H
QkgL1ZGLgvLVQYMNsvBh3ef4koNN3QscqgiAcrBITM/IgzxHVsic96F6viL4fdFr
RwDFLl5nJBuwG/jNkNzRY0eb6CHdtCKES2DOzq6ryobdThK/tPm/s7j5b5Ex1Wwt
zKbi3mf3nwA9ZyKvr2XBOhwYT7DKji/2QVMfVgE1Kjoc2tS7YdMvj4V2FyxpCzG+
jRyjxjXniK7zaRKRIsDcX9lrKhMX3X6BsPv+BcRdbzuhC05vYJmpsyJOY66cBZNX
HwYYlJeIf51FPuTr4v/IiMCj2OuYW/AqMtNiIaTUK48+orXnGH+88RHTcYwPKG3x
Cw4kmLYxc53GAOZ8cyvXV/R6oRj3rug9AW6DIXl4GaT6/sK6hWFAeA3xgEk=
=3ca6
-----END PGP SIGNATURE-----
---
Talk Mailing List
***@gtalug.org
https://gtalug.org/mail
Bob Jonkman via talk
2016-06-20 23:23:29 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanx to all, problem solved! Allan Zhang's suggestion made all the
difference.

A bit of background, for those interested in TMI:

I recorded a presentation on the weekend, and was given a copy of the
.pptx presentations so I could follow along on my computer recording
the audio and keep the slides in synch (kudos to Kirk Zurell for
inspiring me; this is how he recorded Paul Nijjar's "How to Win
Electoral Reform" presentation last year).

Unfortunately, many of the fancy slide transitions didn't work in
LibreOffice; I got lost a couple of times and had to back up (so much
for synching with audio); and anyway, recordmydesktop didn't keep up,
so there were pixel blocks from earlier slides obscuring the current
slide (but the --full-shots parameter might have fixed that).

The idea was that the video (recorded separately) and screencap could
have been combined in KDEnlive to make a nice integrated video. But
since the screencap video is useless, now I'm looking at grabbing each
presentation slide as a .png and adding that to KDEnlive as a static
image.

Unfortunately, slides where the text appears progressively doesn't
translate well to .pptx -> .pdf -> .png, but Alex Zhang pointed me to
the "Expand Animations" .oxt plugin
https://github.com/monperrus/ExpandAnimations/issues It's not perfect
(doesn't preserve master slide background colors or gradients), but it
creates an intermediate *-expanded.odp file that I can work with.
While it means manipulating each .pptx file separately and manually,
it does mean that my problem is solved with the application of a bit
of manual labour.

- --Bob.
Post by Allan Zhang via talk
Post by Allan Zhang via talk
Try libreoffice --headless --convert-to png *.pptx
Sorry, ignore this. This will only convert the first slide of each pptx.
You could batch convert to pdf with libreoffice --headless
--convert-to pdf *.pptx and use unoconv of ImageMagick convert like
Myles said.
http://www.monperrus.net/martin/export+animations+to+pdf+in+libreoffice-openoffice
Hopefully it works and you are able to find a way to automate it for multiple files.
Post by Allan Zhang via talk
- -------- Original Message -------- From: Myles Braithwaite via
Subject: Re: [GTALUG] Converting .pptx files to multiple .png
Post by Bob Jonkman via talk
Hi: I've got a bunch of .pptx (Microsoft PowerPoint) files that
I'd like to convert to individual .png files for each slide,
preferably where each step in a transition becomes its own .png
file.
You can use unoconv[0] (a universal office converter that works
with anything that LibreOffice or OpenOffice support) to convert
them to a pdf file. Then use ImageMagick[1] to convert them to
png files.
Here is a quick script (that probably doesn't work so don't blame
<https://gist.github.com/myles/3656ebcb3026b455d1b3be52d5bd3a58>.
Hope this helps.
Post by Allan Zhang via talk
Post by Allan Zhang via talk
<http://www.imagemagick.org/script/index.php> - --- Talk Mailing
-----BEGIN PGP SIGNATURE-----
iQI5BAEBCgAjHBxBbGxhbiBaaGFuZyA8YWxsYW5AYXppYy5jYT4FAldoRQQACgkQ
lQhQ+uFN8kPO2Q/8CVtmzArNaqUjZat+XZekxv7Q3tquIUGxxtUbUIcqOlZcAsPH
uc2OjSIzs47BUcGA/Cy+QriVINJlIsEZSag3gUsLEuseHxIZw3r4nCwxkQ7vEdO/
OyPRxDxYeYL41ISJGEs1fn+6cYeiaw8K9Xhby5BVGl+DH/m5ikar0v24iiyjDkCh
GbK7vtOQqTzLjw2TY2zosDomvb6OtvICZUfqKLWslSaLhIUcjTIsof6n1H4QTdAg
4xtwKoQL7D4c6Qi89VYtF1mfEYOpgALKSiCW7hzJWs1fmoxw2RtaFIP5ListC84H
QkgL1ZGLgvLVQYMNsvBh3ef4koNN3QscqgiAcrBITM/IgzxHVsic96F6viL4fdFr
RwDFLl5nJBuwG/jNkNzRY0eb6CHdtCKES2DOzq6ryobdThK/tPm/s7j5b5Ex1Wwt
zKbi3mf3nwA9ZyKvr2XBOhwYT7DKji/2QVMfVgE1Kjoc2tS7YdMvj4V2FyxpCzG+
jRyjxjXniK7zaRKRIsDcX9lrKhMX3X6BsPv+BcRdbzuhC05vYJmpsyJOY66cBZNX
HwYYlJeIf51FPuTr4v/IiMCj2OuYW/AqMtNiIaTUK48+orXnGH+88RHTcYwPKG3x
Cw4kmLYxc53GAOZ8cyvXV/R6oRj3rug9AW6DIXl4GaT6/sK6hWFAeA3xgEk=
=3ca6 -----END PGP SIGNATURE-----
https://gtalug.org/mailman/listinfo/talk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Ensure confidentiality, authenticity, non-repudiability

iEYEARECAAYFAldoevAACgkQuRKJsNLM5eoP7ACdGSjuyQXnx+mYLv8rNxG3OKLb
hTQAnAlQ0s9FXryJ8dRlNGtUaJ5I2H7L
=8EOn
-----END PGP SIGNATURE-----
---
Talk Mailing List
***@gtalug.org
https://gtalug

Loading...