Skip to main content

Posts

Showing posts with the label thumbnail

Python converting PDF to Image

I have a task to generate thumbnails of uploaded PDF's. And seems like there no really solid decisions yet. Just garbage on the surface in google results. after googling for a while I found out about many ways to do so. E.g. use python stdin/out to run external command line tool. It might work for you to. But it seemed not so pythonic for me. So I have searched fo better decision. My current is for now to install ImageMagick and MagicWand binding. Install ImageMagick. I have used PIL a while ago to work with images. But it made me cry, before I have met sorl-thumbnails. It helped me a lot. But now I have to deal with PDF's. And ImageMagick seems like a complete decision to master it all.  It has to convert pdf to my direct desirables - jpeg. So to install ImageMagick I have used brew. Like this: brew install imagemagick However there are many other ways to do so , depending on a platform. But I strongly recommend to look at brew . Anyway installing I...

Django: Creating multi upload form without using Flash

Hi there! Today I want to tell you about my experience of adding Multiple files upload form to my  Django project Photoblog.  I searched google for lots of plugins, but found only Flash usage examples. I dislike Flash technology, as for my personal usage, and want to build some more quickly working UI. Personally I have flash blocker installed on my browser. So that's main ideas pf my jQuery plugin selection. I found IMHO the best for my case plugin by  Sebastian Tschan . It had only one problem - No available Django examples. Let's try to fill the gap here... So my experience on befriending  Sebastian Tschan's jQuery File Upload Plugin  with Django is the topic of this article. Let's finally get started. :) Sebastian has built an important plugin IMHO. I want to thank him for his noble work of helping people with their tasks. It uses only jQuery UI and no flash, making it work more programmers way... So enough with the lyrics. Let's try to adapt his example...