Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Connecting liferay to imagemagick
Hi,
I'm trying to connect imagemagick to liferay as an external tool, but I don't seem to get it right, and I'd like some help please. It's probably something real simple, but I'm not used to do these kinds of setups and I haven't been able to figure it out yet.
I have a liferay install on /home/username/CA systest , that's the one I'm setting up. imagemagick is on /home/username/ImageMagick-6.9.10-8. I enabled the checkbox under external services, and also added the path there (now it's set to /usr/local/bin:/usr/local/share/ghostscript/fonts:/usr/local/share/fonts/urw-fonts:/home/username/ImageMagick-6.9.10-8). I also added to the portal.properties file
imagemagick.enabled=true
imagemagick.global.search.path[unix]=/home/inaki.bergara/ImageMagick-6.9.10-8
And yet I still am not able to get it to work. I use im4java to call imagemagick, and I set those dependencies up, but I keep getting a CommandException:
java.io.IOException: Cannot run program "convert": error=2, No such file or directory
I can't figure out what I'm doing wrong, am I overlooking something?
Iñaki Bergara:I have a liferay install on /home/username/CA systest , that's the one I'm setting up. imagemagick is on /home/username/ImageMagick-6.9.10-8. I enabled the checkbox under external services, and also added the path there (now it's set to /usr/local/bin:/usr/local/share/ghostscript/fonts:/usr/local/share/fonts/urw-fonts:/home/username/ImageMagick-6.9.10-8). I also added to the portal.properties fileimagemagick.enabled=true imagemagick.global.search.path[unix]=/home/inaki.bergara/ImageMagick-6.9.10-8And yet I still am not able to get it to work. I use im4java to call imagemagick, and I set those dependencies up, but I keep getting a CommandException:
java.io.IOException: Cannot run program "convert": error=2, No such file or directory
Do you have a file /home/inaki.bergara/ImageMagick-6.9.10-8/convert ? Or is it in a subdirectory, e.g. /home/inaki.bergara/ImageMagick-6.9.10-8/bin/convert ?
Is it executable?
Also, if you configure through properties as well as through the user interface, the user interface configuration (which goes to the database) wins, e.g. your portal-ext.properties are superfluous.
Note that the old setting (the one that you've added to on the UI) contains paths to some font files as well. If you have ImageMagick installed elsewhere, you might need to update the font directories as well (especially for pdf-conversions). So far, especially on Linux, I've always just used the distribution's version of ImageMagick, e.g. I've never downloaded anything specifically, just used whatever the OS made available to me when I asked it to provide ImageMagick.
Powered by Liferay™