Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
contracts /
fpdf184 /
tutorial /
Delete
Unzip
Name
Size
Permission
Date
Action
20k_c1.txt
5.38
KB
-rw-r--r--
2022-09-16 10:08
20k_c2.txt
7.14
KB
-rw-r--r--
2022-09-16 10:08
CevicheOne-Regular-Licence.txt
4.41
KB
-rw-r--r--
2022-09-16 10:08
CevicheOne-Regular.php
3.68
KB
-rw-r--r--
2022-09-16 10:08
CevicheOne-Regular.ttf
34.74
KB
-rw-r--r--
2022-09-16 10:08
CevicheOne-Regular.z
15.13
KB
-rw-r--r--
2022-09-16 10:08
countries.txt
442
B
-rw-r--r--
2022-09-16 10:08
index.htm
842
B
-rw-r--r--
2022-09-16 10:08
logo.png
2.32
KB
-rw-r--r--
2022-09-16 10:08
makefont.php
141
B
-rw-r--r--
2022-09-16 10:08
tuto1.htm
4.67
KB
-rw-r--r--
2022-09-16 10:08
tuto1.php
160
B
-rw-r--r--
2022-09-16 10:08
tuto2.htm
5.5
KB
-rw-r--r--
2022-09-16 10:08
tuto2.php
783
B
-rw-r--r--
2022-09-16 10:08
tuto3.htm
8.75
KB
-rw-r--r--
2022-09-16 10:08
tuto3.php
1.73
KB
-rw-r--r--
2022-09-16 10:08
tuto4.htm
9.57
KB
-rw-r--r--
2022-09-16 10:08
tuto4.php
2.19
KB
-rw-r--r--
2022-09-16 10:08
tuto5.htm
12.04
KB
-rw-r--r--
2022-09-16 10:08
tuto5.php
2.27
KB
-rw-r--r--
2022-09-16 10:08
tuto6.htm
11.6
KB
-rw-r--r--
2022-09-16 10:08
tuto6.php
2.4
KB
-rw-r--r--
2022-09-16 10:08
tuto7.htm
8.27
KB
-rw-r--r--
2022-09-16 10:08
tuto7.php
265
B
-rw-r--r--
2022-09-16 10:08
Save
Rename
<!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, footer, page break and image</title> <link type="text/css" rel="stylesheet" href="../fpdf.css"> </head> <body> <h1>Header, footer, page break and image</h1> Here's a two page example with header, footer and logo: <div class="source"> <pre><code><?php <span class="kw">require(</span><span class="str">'fpdf.php'</span><span class="kw">); class </span>PDF <span class="kw">extends </span>FPDF <span class="kw">{ </span><span class="cmt">// Page header </span><span class="kw">function </span>Header<span class="kw">() { </span><span class="cmt">// Logo </span>$<span class="kw">this-></span>Image<span class="kw">(</span><span class="str">'logo.png'</span><span class="kw">,</span>10<span class="kw">,</span>6<span class="kw">,</span>30<span class="kw">); </span><span class="cmt">// Arial bold 15 </span>$<span class="kw">this-></span>SetFont<span class="kw">(</span><span class="str">'Arial'</span><span class="kw">,</span><span class="str">'B'</span><span class="kw">,</span>15<span class="kw">); </span><span class="cmt">// Move to the right </span>$<span class="kw">this-></span>Cell<span class="kw">(</span>80<span class="kw">); </span><span class="cmt">// Title </span>$<span class="kw">this-></span>Cell<span class="kw">(</span>30<span class="kw">,</span>10<span class="kw">,</span><span class="str">'Title'</span><span class="kw">,</span>1<span class="kw">,</span>0<span class="kw">,</span><span class="str">'C'</span><span class="kw">); </span><span class="cmt">// Line break </span>$<span class="kw">this-></span>Ln<span class="kw">(</span>20<span class="kw">); } </span><span class="cmt">// Page footer </span><span class="kw">function </span>Footer<span class="kw">() { </span><span class="cmt">// Position at 1.5 cm from bottom </span>$<span class="kw">this-></span>SetY<span class="kw">(-</span>15<span class="kw">); </span><span class="cmt">// Arial italic 8 </span>$<span class="kw">this-></span>SetFont<span class="kw">(</span><span class="str">'Arial'</span><span class="kw">,</span><span class="str">'I'</span><span class="kw">,</span>8<span class="kw">); </span><span class="cmt">// Page number </span>$<span class="kw">this-></span>Cell<span class="kw">(</span>0<span class="kw">,</span>10<span class="kw">,</span><span class="str">'Page '</span><span class="kw">.</span>$<span class="kw">this-></span>PageNo<span class="kw">().</span><span class="str">'/{nb}'</span><span class="kw">,</span>0<span class="kw">,</span>0<span class="kw">,</span><span class="str">'C'</span><span class="kw">); } } </span><span class="cmt">// Instanciation of inherited class </span>$pdf <span class="kw">= new </span>PDF<span class="kw">(); </span>$pdf<span class="kw">-></span>AliasNbPages<span class="kw">(); </span>$pdf<span class="kw">-></span>AddPage<span class="kw">(); </span>$pdf<span class="kw">-></span>SetFont<span class="kw">(</span><span class="str">'Times'</span><span class="kw">,</span><span class="str">''</span><span class="kw">,</span>12<span class="kw">); for(</span>$i<span class="kw">=</span>1<span class="kw">;</span>$i<span class="kw"><=</span>40<span class="kw">;</span>$i<span class="kw">++) </span>$pdf<span class="kw">-></span>Cell<span class="kw">(</span>0<span class="kw">,</span>10<span class="kw">,</span><span class="str">'Printing line number '</span><span class="kw">.</span>$i<span class="kw">,</span>0<span class="kw">,</span>1<span class="kw">); </span>$pdf<span class="kw">-></span>Output<span class="kw">(); </span>?></code></pre> </div> <p class='demo'><a href='tuto2.php' target='_blank' class='demo'>[Demo]</a></p> This example makes use of the <a href='../doc/header.htm'>Header()</a> and <a href='../doc/footer.htm'>Footer()</a> methods to process page headers and footers. They are called automatically. They already exist in the FPDF class but do nothing, therefore we have to extend the class and override them. <br> <br> The logo is printed with the <a href='../doc/image.htm'>Image()</a> method by specifying its upper-left corner and its width. The height is calculated automatically to respect the image proportions. <br> <br> To print the page number, a null value is passed as the cell width. It means that the cell should extend up to the right margin of the page; this is handy to center text. The current page number is returned by the <a href='../doc/pageno.htm'>PageNo()</a> method; as for the total number of pages, it's obtained via the special value <code>{nb}</code> which is substituted when the document is finished (provided you first called <a href='../doc/aliasnbpages.htm'>AliasNbPages()</a>). <br> Note the use of the <a href='../doc/sety.htm'>SetY()</a> method which allows to set position at an absolute location in the page, starting from the top or the bottom. <br> <br> Another interesting feature is used here: the automatic page breaking. As soon as a cell would cross a limit in the page (at 2 centimeters from the bottom by default), a break is issued and the font restored. Although the header and footer select their own font (Arial), the body continues with Times. This mechanism of automatic restoration also applies to colors and line width. The limit which triggers page breaks can be set with <a href='../doc/setautopagebreak.htm'>SetAutoPageBreak()</a>. </body> </html>