by Martin Eliasson
2007-01-26 20:11:17
undefined

Technology: pdf thumbnails soo easy

By accident, I found the solution to a problem I've been researching for a while: to find a way to create a jpg thumbnail from a pdf document.

Just a few days ago I needed to use my sites capability to manage tracks to store some large pdf:s, too big to mail, so I just uploaded them as tracks.

In the background there is an ImageMagick process converting all uploaded photos to thumbnails and I never made it fool proof so I was gambling the pdf wouldnt be sent to the ImageMagick process just like audio tracks or mayb that ImageMagick would just return an error and let the process continue.

Suprise. ImageMagick converted my pdfs to nice jpg images I discovered this morning, it just took a while.

Im impressed.

static/tracks/8/Jiingijamborii_Utsikt-s.jpg

Update 9/2 2007: I just discovered that multipage tiffs becomes a series of jpg which is in a way great but it breaks my naming scheme.

Comments