Yet another blog (hopefully a useful one though)
Archive for December, 2009
“Best in Class” Interactive Media Award for www.ehsmithfacades.co.uk
Dec 18th
Awards are always good and I have to say that an award is a really nice way to round off a successful year. We have won a “Best in Class” Interactive Media Award for the site we made for EH Smith Specialist Facades at www.ehsmithfacades.co.uk.
This award brings our tally to three for the last quarter of 2009 with two for Trident Housing Association’s website.
EH Smith Facades Website
The site is aimed at architects so we planned a very visual website. The usual content management features were required to run the site. We were fortunate that EH Smith had some fantastic photos of some of the buildings that had used their products so we decided to make a feature of these and placed a large image in the background of the site. We also added a fade-down feature for the site to expose the photo fully.
The notification we recieved said:
Congratulations! We are happy to announce that your entry into the IMA competition, the EH Smith Specialist Facades website (entered October 15, 2009), under the category ‘Building/Construction’, has won the IMA Best in Class Award with an overall score of 483.
The Best in Class award is the highest honor bestowed by the Interactive Media Awards. It represents the very best in planning, execution and overall professionalism. In order to win this award level, your site had to successfully pass through our comprehensive judging process, achieving very high marks in each of our judging criteria – an achievement only a fraction of sites in the IMA competition earn each year.
I am very pleased with this award as we have worked very hard, not only on this site, this year so it shows we are obviously doing something right. Hopefully we will be able to build on this next year to have a fantastic 2010!
How to get ImageMagick to Convert pdf’s with GhostScript
Dec 14th

Ok, this is one for the nerds. I have spent most of today trying to figure out how to get ImageMagick to convert a pdf file to an image.
First I installed ImageMagick fine:
> wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
> tar xvfz ImageMagick.tar.gz
> cd ImageMagick-6.5.8
> ./configure
> make
> make install
Then I installed the Imagick PECL module in cPanel.
I ran a test on the command line:
> /usr/local/bin/convert test.pdf test.jpg
And like Magick we had a jpg!
So, simple I thought, run an exec() function on the above and it will do the job. However…
Basically it didn’t work. It wouldn’t work with an Imagic script either:
<?php try { $im = new Imagick(); $im->readImage( "test.pdf" ); $im->pingImage("test.pdf"); $im->readImage( $image ); $im->setImageFormat( "jpg" ); $im->writeImage( 'test.jpg' ); echo 'Image Converted'; } catch(Exception $e) { echo $e->getMessage(); } ?>
Hmmm!?
So, I tried to simplify the situation and converted a jpg to a png whit the script as above and both worked perfectly. So I checked the Apache error log and found that aparently “gs” did not exist. So I installed Ghostscript (which is apparently required for converting pdf’s and ps’s with exact same procedure as for Imagemagick except with the appropriate ghostscript tar.gz file. And…
Still nothing!
So, I did a bit of trawling and it turned out that Apache did not have the path to Ghostscript in the environmental path. To cut a fairly long story short I could not get httpd.conf, php.ini or .htaccess to cooperate in adding the path so I created a symbolic link from a directory already in the Apache path (/usr/bin/) to the actual location with:
> ln /usr/local/bin/ /usr/bin/
And by some minor miracle it worked!
So, if you have Imagemagick and Ghostscript installed and images work fine but pdf’s will not convert (like about 100 people I found in google-land), find your path with:
<?php echo getenv("PATH"); ?>
Then run:
> whereis gs
To find GhostScript (gs)
and run:
> ln /usr/local/bin/ /usr/bin/
Or equivalent.
Enjoy!