RE: Connecting liferay to imagemagick

Iñaki Bergara, modified 7 Years ago. Junior Member Posts: 65 Join Date: 10/30/11 Recent Posts

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?

thumbnail
Olaf Kock, modified 7 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
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 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

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.