title: FPDF isnt adding new page
body: <p>this is the snippet of my code in which i am trying to generate pdf when their is 1 value in the array e.g  </p>
  
  <pre><code>"$arrIds = array('10'); ". 
  </code></pre>
  
  <p>My code generates the pdf, but when there are more values in the array i am unable to see the next pages. </p>
  
  <pre><code>  function action_pdf_reportPt10()
  {
      $arrIds = array('10', '5', '12', '31');
      foreach ($arrIds as $id)
      {
          $this-&gt;_Pt10_Calculations-&gt;setPropertyId($id);
          $this-&gt;_FpdfGenerator = new Fpdf('L');
          $pt10values = $this-&gt;_Pt10_Calculations-&gt;fetch_record_by_property_id();
  
  
          $this-&gt;generate_pt10($pt10values);
  
      }
  
      $this-&gt;load-&gt;view('admin/property/report_pt10', $this-&gt;view_data);
  }
  </code></pre>
  
  <p>And </p>
  
  <pre><code> public function generate_pt10($pt10values)
  {
      $tax_amount = round(@$pt10values[0]['tax_amount']);
  
      $self_rented = @$pt10values[0]['self_rent'];
      switch ($self_rented)
      {
          case '1':
              $self_rented = 'Self';
              break;
          case '2':
              $self_rented = 'Rented';
              break;
          case '3':
              $self_rented = '1)Self 2)Rented';
              break;
      }
  
      $location = @$pt10values[0]['location'];
      switch ($location)
      {
          case '1':
              $location = 'Main Road';
              break;
          case '2':
              $location = 'Off Road';
              break;
      }
  
  
      $baseXcoordinate = 5;
  
      $this-&gt;_FpdfGenerator-&gt;AddPage();
      $this-&gt;_FpdfGenerator-&gt;AliasNbPages();
      $this-&gt;_FpdfGenerator-&gt;SetXY($baseXcoordinate, 10);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 5);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(13, 7, 'Rating Area', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY(18, 10);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 6);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(15, 7, 'Zone', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY(33, 10);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 5);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(25, 7, 'Area', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY($baseXcoordinate, 24);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 7);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(28, 9, 'Property No', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY($baseXcoordinate, 33);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 7);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(28, 9, 'Pin', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY(58, 10);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 6);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(20, 7, 'Issue Date', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY(78, 10);
      $this-&gt;_FpdfGenerator-&gt;SetFont('Arial', 'B', 6);
      $this-&gt;_FpdfGenerator-&gt;MultiCell(25, 7, 'Due Date For Payment', 1);
      $this-&gt;_FpdfGenerator-&gt;SetXY(89.5, 10);
      $this-&gt;_FpdfGenerator-&gt;ln();
      $this-&gt;_FpdfGenerator-&gt;Output();
     }
  </code></pre>
  
  <p>i Dont know what am i missing coz for single value in array it is working fine. But when there are more then values in array it is not adding the pages.</p>