Closed (won't fix)
Project:
ImageCache
Version:
6.x-2.0-beta12
Component:
imagecache_image module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2011 at 07:38 UTC
Updated:
13 Jul 2012 at 14:26 UTC
I'm trying to create an images from uploaded .pdf with ImageCache.
But it works only if I commented this code (line 459)
if (!getimagesize($src)) {
watchdog('imagecache', '403: TEST1 File is not an image %image ', array('%image' => $src), WATCHDOG_ERROR);
header('HTTP/1.0 403 Forbidden');
exit;
}
I would like to request this feature :).
Thanks,
Ferry
Comments
Comment #1
truyenle commented+Subscribe.
Comment #2
joel_guesclin commentedI would also like to request this feature. It seems absurd to me that this has not been done, especially since there is obviously a requirement, as specified here (and witness the numerous comments). I find it especially regrettable that the upgrades to Imagecache should break something that previously worked. Please... (pretty please :) ) can we have this feature back?
Also, I would like to ask Ferrylauda what his custom action code is for converting PDF to image (all I want is an image of the front page of the PDF, not an image for each page). Because I applied the change he suggested to the imagecache module but now it just says "La génération d'une image à partir de 20120201planning_0.pdf en utilisant le profil imagecache pdf a échoué." (ie the generation of an image failed)... which is not very informative!
Comment #3
babbage commentedAh yes, upgrading Imagecache also broke this for me, while testing in dev.
Rather than commenting out those lines as Ferry suggested, a slightly less extreme approach is to modify the first of those lines to be:
if (!getimagesize($src) && (!$src['extension'] == 'pdf')) {This then provides an exception in the way that commenting out would, but only if the file in question ends in the extension .pdf. A cleaner approach I think.
:)
Comment #4
fizk commentedThis feature can be found in other modules on Drupal.org
Comment #5
derMatze commentedCan you tell me which modules these are?
I could only find modules that provide field types for uploading pdf and converting these files, but no imagecache action at all...