Portfolio / oncall / www / php / fpdf / doc / acceptpagebreak.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link type="text/css" rel="stylesheet" href="../fpdf.css">
<code><b>boolean</b> AcceptPageBreak()</code>
Whenever a page break condition is met, the method is called, and the break is issued or not
depending on the returned value. The default implementation returns a value according to the
mode selected by SetAutoPageBreak().
This method is called automatically and should not be called directly by the application.
The method is overriden in an inherited class in order to obtain a 3 column layout:
<div class="doc-source">
<pre><code>class PDF extends FPDF
var $col = 0;

function SetCol($col)
    // Move position to a column
    $this-&gt;col = $col;
    $x = 10+$col*65;

function AcceptPageBreak()
        // Go to next column
        return false;
        // Go back to first column and issue page break
        return true;

$pdf = new PDF();
    $pdf-&gt;Cell(0,5,&quot;Line $i&quot;,0,1);
<h2>See also</h2>
<a href="setautopagebreak.htm">SetAutoPageBreak()</a>.
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>