westdc-zf1/include/fpdf/doc/header.htm

38 lines
1.1 KiB
HTML
Raw Normal View History

2009-03-06 03:20:46 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Header</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>Header</h1>
<code>Header()</code>
<h2>Description</h2>
This method is used to render the page header. It is automatically called by AddPage() and
should not be called directly by the application. The implementation in FPDF is empty, so
you have to subclass it and override the method if you want a specific processing.
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Header()
{
2011-11-03 02:25:38 +00:00
// Select Arial bold 15
2009-03-06 03:20:46 +00:00
$this-&gt;SetFont('Arial','B',15);
2011-11-03 02:25:38 +00:00
// Move to the right
2009-03-06 03:20:46 +00:00
$this-&gt;Cell(80);
2011-11-03 02:25:38 +00:00
// Framed title
2009-03-06 03:20:46 +00:00
$this-&gt;Cell(30,10,'Title',1,0,'C');
2011-11-03 02:25:38 +00:00
// Line break
2009-03-06 03:20:46 +00:00
$this-&gt;Ln(20);
}
}</code></pre>
</div>
<h2>See also</h2>
<a href="footer.htm">Footer()</a>.
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>