In SWFTools a programs called gfx2gfx is available to do this task, but it's not officially available precompiled.
It can convert SWF, PDF or image to SWF, PDF, ebook or image.
To use it, you need pdflib with downloadable sources or installable via macport sudo port install pdflib.
Create a file prepare.sh, copy following code, set as executable (chmod +x prepare.sh) and execute it (./prepare.sh) :
#!/bin/bash
# Create working folder and download sources
mkdir swftools
cd swftools
# Git is requiered here to download sources
git clone git://git.swftools.org/swftools .
# replace `../../swftools/` to `../` in sources
sed "s/..\/..\/swftools\//..\//g" src/gfx2gfx.c > src/gfx2gfx.c.tmp && mv src/gfx2gfx.c.tmp src/gfx2gfx.c
# On top of `Makefile.in` add `vpath = src` (will add `src` folder to sources folders)
echo "vpath = src" | cat - Makefile.in > Makefile.in.tmp && mv Makefile.in.tmp Makefile.in
./configure
make
cd src
make gfx2gfx
gfx2gfx file.swf -o file.pdf
This example use gfx2gfx to convert slides of slideshare slide show to PDFs
It use this slide show
View source of HTML, and find:
- ID: like
"doc":"xxx-xxx-phpapp0x"(just search"doc":) - slides count: like
"slide_count":xx(just search"slide_count":)
Create a file download_convert.sh, copy following code and change the path of gfx2gfx tool and founded values
#!/bin/bash
# ID
doc="neumar2013final-130325115515-phpapp01"
# Number of slides
numSlides=51
# Path to gfx2gfx tool
gfx2gfx="/usr/local/bin/gfx2gfx"
echo "See also:"
echo "http://s3.amazonaws.com/slideshare/$doc.pdf"
echo "http://s3.amazonaws.com/ppt-download/$doc.pdf"
echo "http://s3.amazonaws.com/ppt-download/$doc.ppt"
echo "http://s3.amazonaws.com/slideshare/$doc.xml"
mkdir "$doc"
cd "$doc"
for (( slide=1; slide<=$numSlides; slide++ ))
do
wget --no-check-certificate -O "slide-$slide.swf" "https://slideshare.s3.amazonaws.com/$doc-slide-$slide.swf"
"$gfx2gfx" "slide-$slide.swf" -o "slide-$slide.pdf"
done
Based on:
- http://lists.gnu.org/archive/html/swftools-common/2011-01/msg00051.html
- http://techawakening.org/download-author-disabled-slideshare-presentations/1361/
- http://phildawson.tumblr.com/post/46675700/slideshare-hacked-download-any-slide-without-logging
See also