Skip to content

Instantly share code, notes, and snippets.

@romantomjak
Last active May 8, 2017 15:03
Show Gist options
  • Save romantomjak/1f61717e8ef62edd26f4 to your computer and use it in GitHub Desktop.
Save romantomjak/1f61717e8ef62edd26f4 to your computer and use it in GitHub Desktop.
Download SlideShare presentation from the command line (JPG to PDF)

Step 1

Search document source for data-full, data-normal or data-small attribute.

e.g. http://image.slidesharecdn.com/phpnw12-silex-the-microframeworkcopy-121006130218-phpapp01/95/silex-the-microframework-1-1024.jpg?cb=1349546989

Step 2

Mark number of slides (82 in this example) and then let cURL download all of presentation slides:

curl -O http://image.slidesharecdn.com/phpnw12-silex-the-microframeworkcopy-121006130218-phpapp01/95/silex-the-microframework-[1-82]-1024.jpg

The important parte being "...microframework-[1-82]-1024...". It instructs cURL to download all files in range 1-82.

Step 3

Convert all images into a PDF file using convert (part of ImageMagick):

convert *.jpg -adjoin silex-the-microframework.pdf
@speedracr
Copy link

Thanks! One hint: if it doesn't work, try wrapping the URL in quotation marks:
curl -O "http://image.slidesharecdn.com/phpnw12-silex-the-microframeworkcopy-121006130218-phpapp01/95/silex-the-microframework-[1-82]-1024.jpg"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment