title: generating multiple pdf document and merge into one
body: <p>This is my controller function where i am running a loop to create multiple document pdf
   and merge into one.</p>
  
  <pre><code>public function tick_pdf(){
  
       $tt='';
  
    $name="iftekhar"; 
        $title="Event Football";
        $num=4;
  
      for($i=0;$i&lt;4;$i++){
  
  
  
  
      $this-&gt;pdfHeader($row-&gt;EventId);
      $this-&gt;pdf-&gt;fontpath = 'font/'; 
      //$this-&gt;pdf-&gt;AddPage();
  
      $this-&gt;pdf-&gt;Ln(10);
  
  
      $this-&gt;pdf-&gt;SetFont('Arial','B',12);
      $this-&gt;pdf-&gt;Cell(10);
      $this-&gt;pdf-&gt;Cell(60,10,"Name",0,0,'L');
      $this-&gt;pdf-&gt;Cell(10,10,":",0,0,'L');
      $this-&gt;pdf-&gt;MultiCell(60,10,$name,0,1);
  
      $this-&gt;pdf-&gt;SetFont('Arial','B',12);
      $this-&gt;pdf-&gt;Cell(10);
      $this-&gt;pdf-&gt;Cell(60,10,"Title",0,0,'L');
      $this-&gt;pdf-&gt;Cell(10,10,":",0,0,'L');
      $this-&gt;pdf-&gt;MultiCell(60,10,$title,0,1);
  
      $this-&gt;pdf-&gt;SetFont('Arial','B',12);
      $this-&gt;pdf-&gt;Cell(10);
      $this-&gt;pdf-&gt;Cell(60,10,"Number",0,0,'L');
      $this-&gt;pdf-&gt;Cell(10,10,":",0,0,'L');
      $this-&gt;pdf-&gt;MultiCell(60,10,$num,0,1);
  
      $this-&gt;pdf-&gt;SetFont('Arial','B',12);
      $this-&gt;pdf-&gt;Cell(10);
      $this-&gt;pdf-&gt;Cell(60,10,"Date",0,0,'L');
      $this-&gt;pdf-&gt;Cell(10,10,":",0,0,'L');
      $this-&gt;pdf-&gt;MultiCell(60,10,$date,0,1);
  
  
  
      $tt.=$this-&gt;pdf-&gt;Output('', 'S');
  
  
  
      }
      echo $tt;
  
    }
  </code></pre>
  
  <p>but I am gettiin an error in browser 
  "Undefined index: data
  Filename: libraries/fpdf.php
  Line Number: 1659" I am using fpdf for generating pdf</p>