Re:5 Years of Bad Ideas -- Python tips, tricks, and chicanery
by downvoteme on Sunday May 13, 2012 @01:56AM
(#3966180)
Here's a shell function.
Pipe the scribd html page into it and, voila!, out pops .jpg urls for each page of the PDF document.
Feed them to curl or whatever you program you use.
Open them with your browser or your image viewer.
Pipe them to ghostscript, remake the PDF to your own specs.
Whatever.
But for the love of God, stay away from scribd.com
That site is an annoyance and I doubt it will ever improve.
scrib(){ sed -n ' s,http://html.scribd.com,\
&,g; s,http://html[1-9].scribdassets.com,\
&,g; s,assets,,; s,pages,images,; s,jsonp,jpg, ; s,html[1-9].scribd.com,html.scribd.com,; s,pageParams.contentUrl = \",,; s,\";,,; s,<img class=\".orig=\",,; s,\"/>,,; /^$/d;
/html.scribd.com.images.*jpg/p; ' |sed '/http/!d'; }