You are here

function pdf_to_image_install in PDF to ImageField 7.3

Implements hook_install().

File

./pdf_to_image.install, line 14
PDF to Image install and enable hooks.

Code

function pdf_to_image_install() {
  if ('' == variable_get('imagemagick_convert', '')) {

    // Try to find the ImageMagick path.
    foreach (array(
      '/usr/bin/convert',
      '/usr/local/bin/convert',
    ) as $path) {
      if (file_exists($path)) {
        variable_set('imagemagick_convert', $path);
        break;
      }
    }
  }
}