colonymech / docs / www / colonyscout / internal / fpdf16 / doc / header.htm @ f59acf11
History | View | Annotate | Download (1.05 KB)
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|
2 |
<html>
|
3 |
<head>
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
5 |
<title>Header</title> |
6 |
<link type="text/css" rel="stylesheet" href="../fpdf.css"> |
7 |
</head>
|
8 |
<body>
|
9 |
<h1>Header</h1> |
10 |
<code>Header()</code> |
11 |
<h2>Description</h2> |
12 |
This method is used to render the page header. It is automatically called by AddPage() and |
13 |
should not be called directly by the application. The implementation in FPDF is empty, so |
14 |
you have to subclass it and override the method if you want a specific processing. |
15 |
<h2>Example</h2> |
16 |
<div class="doc-source"> |
17 |
<pre><code>class PDF extends FPDF |
18 |
{ |
19 |
function Header() |
20 |
{ |
21 |
//Select Arial bold 15 |
22 |
$this->SetFont('Arial','B',15);
|
23 |
//Move to the right |
24 |
$this->Cell(80);
|
25 |
//Framed title |
26 |
$this->Cell(30,10,'Title',1,0,'C');
|
27 |
//Line break |
28 |
$this->Ln(20);
|
29 |
} |
30 |
}</code></pre> |
31 |
</div>
|
32 |
<h2>See also</h2> |
33 |
<a href="footer.htm">Footer()</a>. |
34 |
<hr style="margin-top:1.5em"> |
35 |
<div style="text-align:center"><a href="index.htm">Index</a></div> |
36 |
</body>
|
37 |
</html>
|