title: Using dompdf library in codeigniter
body: <p>can anybody help me, i'm trying to use dompdf library with codeigniter. When i do it on localhost its work. But it's not work properly when my website has been uploaded. Here's the library code</p>
  
  <pre><code>    &lt;?php defined('BASEPATH') OR exit('No direct script access allowed');
  /**
   * CodeIgniter PDF Library
   *
   * Generate PDF's in your CodeIgniter applications.
   *
   * @package         CodeIgniter
   * @subpackage      Libraries
   * @category        Libraries
   * @author          Chris Harvey
   * @license         MIT License
   * @link            https://github.com/chrisnharvey/CodeIgniter-PDF-Generator-Library
   */
  require_once(dirname(__FILE__) . '/dompdf-0.6.2/dompdf_config.inc.php');
  class Pdf extends DOMPDF
  {
      /**
       * Get an instance of CodeIgniter
       *
       * @access  protected
       * @return  void
       */
      protected function ci()
      {
          return get_instance();
      }
      /**
       * Load a CodeIgniter view into domPDF
       *
       * @access  public
       * @param   string  $view The view to load
       * @param   array   $data The view data
       * @return  void
       */
      public function load_view($view, $data = array())
      {
          $html = $this-&gt;ci()-&gt;load-&gt;view($view, $data, TRUE);
          $this-&gt;load_html($html);
      }
  }
  </code></pre>
  
  <p>this code to call create the pdf, i try to call the view only and it's work but when its called the "pdf" function, the screen is blank.</p>
  
  <pre><code>    $this-&gt;load-&gt;library('pdf');
      $this-&gt;pdf-&gt;load_view('mydocument', $data);
      $this-&gt;pdf-&gt;render();
      $this-&gt;pdf-&gt;stream("mydocument.pdf");
  </code></pre>
  
  <p>and this is structure of my files</p>
  
  <p><a href="https://i.stack.imgur.com/ArEZr.png" rel="nofollow noreferrer">enter image description here</a></p>