EIOS/inc/fpdf/doc/header.htm

41 lines
1.2 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">
<title>Header</title>
<link type="text/css" rel="stylesheet" href="fpdf.css">
</head>
<body>
<h1>Header</h1>
<code>Header()</code>
<h4 class='st'>Âåðñèÿ</h4>
1.0
<h4 class='st'>Îïèñàíèå</h4>
Ýòîò ìåòîä èñïîëüçóåòñÿ äëÿ çàäàíèÿ çàãîëîâêà ñòðàíèöû. Îí àâòîìàòè÷åñêè âûçûâàåòñÿ
ìåòîäîì AddPage(), òàê ÷òî åãî íå îáÿçàòåëüíî âûçûâàòü íåîñðåäñòâåííî èç ïðèëîæåíèÿ.
Ðåàëèçàöèÿ ýòîãî ìåòîäà â FPDF ïóñòà, ïîýòîìó åñëè íóæíî çàäàòü ñïåöèôè÷åñêóþ îáðàáîòêó,
íóæíî ïåðåïèñàòü ýòîò ìåòîä.
<h4 CLASS='st'>Ïðèìåð</h4>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Header()
{
//âûáèðàåì Arial ðàçìåðà 15
$this-&gt;SetFont('Arial','B',15);
//Ïåðåäâèãàåìñÿ âïðàâî
$this-&gt;Cell(80);
//Çàãîëîâîê ñ ãðàíèöàìè
$this-&gt;Cell(30,10,'Title',1,0,'C');
//Ðàçðûâ ñòðîêè
$this-&gt;Ln(20);
}
}</code></pre>
</div>
<h4 class='st'>Ñì. òàêæå</h4>
<a href="footer.htm">Footer()</a>.
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Îãëàâëåíèå</a></div>
</body>
</html>