title: FPDF after page break using SetAutoPageBreak multicell values are not inserted in the defined Y position
body: <p>I am trying to display data using multiCell. And when the data in the page arrives to y=228 I want it to go to the next Page And be displayed in the position y=112.</p>
  
  <p>As first Step I tried to only add 2 simple conditions :</p>
  
  <blockquote>
    <p>when the data arrives to position y=228 create a new page
    when the data goes to the next Page display the result at position =112 </p>
  </blockquote>
  
  <p>It worked. But if the current multiCell content is large it dosn't go to the next page untill it finishs writting all the multicell content , so I added the function <code>SetAutoPageBreak</code> So it inserts a page Break when y=228 .
  Here where the problems start The code doesnt insert my data in the new page in the position I defined (y=112) it insert it in the start .I don't know how to fix this problem I hope I could find some help I will appreciate it.</p>
  
  <p>Here is My code :</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  require ('../fpdf/fpdf.php');
  
  $pdf = new FPDF();
  $pdf-&gt;AddPage();
  $pdf-&gt;SetFont('Arial', 'B', 12);
  $y = $pdf-&gt;GetY();
  $x = $pdf-&gt;GetX();
  $width_cell = array(
      10,
      30,
      50
  );
  $pdf-&gt;SetFillColor(193, 229, 252);
  $pdf-&gt;SetY(112);
  
  $pdf-&gt;Cell($width_cell[0], 10, 'ID', 1, 0, C, true);
  $pdf-&gt;Cell($width_cell[1], 10, 'NAME', 1, 0, C, true);
  $pdf-&gt;Cell($width_cell[2], 10, 'CLASS', 1, 1, C, true);
  
  $pdf-&gt;SetFont('Arial', '', 10);
  
  for ($i = 0;$i &lt; 30; $i++) {
      $pdf-&gt;Cell($width_cell[0], 10, $i, 1, 0, C, false);
      $pdf-&gt;Cell($width_cell[1], 10, 'John Deo', 1, 0, C, false);
      $pdf-&gt;Cell($width_cell[2], 10, 'Four', 1, 1, C, false);
      $y = $pdf-&gt;GetY();
      $pdf-&gt;Cell($width_cell[0], 10, $i, 1, 0, C, false);
      $pdf-&gt;Cell($width_cell[1], 10, 'Y:' . $y, 1, 0, C, false);
  
      // $pdf-&gt;Cell($width_cell[2],10,'Four',1, 1, C, false);
      $pdf-&gt;MultiCell($width_cell[2], 10, 'four four four four four four four four four four four four four four four four four four four four four four ', 1, C, false);
  
      // Uncomment this line to see what Happends when the Page Break is inserted
      // $pdf-&gt;SetAutoPageBreak(auto,69);
      $y = $pdf-&gt;GetY();
      if ($y &gt; 228 &amp;&amp; $i != 29) {
          $pdf-&gt;AddPage();
          $pdf-&gt;SetY(112);
      }
  
      /*
      if ($pdf-&gt;PageNo() != 1 &amp;&amp; $y &lt; 20){
  
  
         $pdf-&gt;SetY(112);
      }
      */
  }
  $pdf-&gt;Output();
  
  ?&gt;
  </code></pre>