Using imagemagick to render PDf is not very portable as IIRC it requires ghostscript. Here's a patch to feeds/news.py taht will automatically handle a pdf cover, test it and let me know
Code:
=== modified file 'src/calibre/web/feeds/news.py'
--- src/calibre/web/feeds/news.py 2009-12-29 16:04:28 +0000
+++ src/calibre/web/feeds/news.py 2009-12-30 22:47:18 +0000
@@ -823,6 +823,14 @@
cpath = os.path.join(self.output_dir, 'cover.'+ext)
with nested(open(cpath, 'wb'), closing(self.browser.open(cu))) as (cfile, r):
cfile.write(r.read())
+ if ext.lower() == 'pdf':
+ from calibre.ebook.metadata.pdf import get_metadata
+ stream = open(cpath, 'rb')
+ mi = get_metadata(stream)
+ cpath = None
+ if mi.cover_data and mi.cover_data[1]:
+ cpath = os.path.join(self.output_dir, 'cover.png')
+ open(cpath, 'wb').write(mi.cover_data[1])
self.cover_path = cpath