title: pdf generation not working in framework Zend
body: <p>I have a script that generates a PDF in Zend. I copied the script from converting image to pdf to another directory on the server. I now get the error:</p>
  
  <pre><code>Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. 
  File not found.' in /kalendarz/Zend/Pdf/Resource/ImageFactory.php:38 
   Stack trace: 
   #0 /kalendarz/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('data/0116b4/cro...') 
   #1 /kalendarz/cms.php(56): Zend_Pdf_Image::imageWithPath('data/0116b4/cro...') 
   #2 {main} thrown in /kalendarz/Zend/Pdf/Resource/ImageFactory.php on line 38
  </code></pre>
  
  <p>Code of website, example link to image (http://tinyurl.com/8srbfza):</p>
  
  <pre><code>else if($_GET['action']=='generate') {
      //1 punkt typograficzny postscriptowy (cyfrowy) = 1/72 cala = 0,3528 mm
      function mm_to_pt($size_mm) {
        return $size_mm/0.3528;
      }
  
      require_once("Zend/Pdf.php");
  
      $pdf = new Zend_Pdf(); 
  
      $page_w = mm_to_pt(100);
      $page_h = mm_to_pt(90);
  
      $page = $pdf-&gt;newPage($page_w.':'.$page_h.':'); 
      $pdf-&gt;pages[] = $page; 
  
      $imagePath= 'data/'.$_GET['id'].'/crop_'.$_GET['id'].'.jpg'; //to nie jest miniaturka
      $image = Zend_Pdf_Image::imageWithPath($imagePath);
  
  
      $left = mm_to_pt(0);
      $right = mm_to_pt(100);
      $top = mm_to_pt(90);
      $bottom = mm_to_pt(0);
  
      $page-&gt;drawImage($image, $left, $bottom, $right, $top);     
  
      $pdfData = $pdf-&gt;render(); 
  
      header("Content-Disposition: inline; filename=".$_GET['id'].".pdf"); 
      header("Content-type: application/x-pdf"); 
      echo $pdfData; 
      die();
    }
  </code></pre>