noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
pdf_land.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/
20
21// Copyright Author Dany De Bontridder danydb@noalyss.eu
22
23/**
24 * @file
25 * @brief PDF in landscape mode
26 */
27
28/**
29 * @class PDFLand
30 * @brief PDF in landscape mode
31 */
32#[\AllowDynamicProperties]
33class PDFLand extends PDF
34{
35
36 public function __construct ($p_cn = null, $orientation = 'L', $unit = 'mm', $format = 'A4')
37 {
38
39 if($p_cn == null) die("No database connection. Abort.");
40 $this->bigger=0;
41
42 parent::__construct($p_cn,'L', $unit, $format);
43 date_default_timezone_set ('Europe/Paris');
44 $this->AddFont('DejaVu','','DejaVuSans.ttf',true);
45 $this->AddFont('DejaVu','B','DejaVuSans-Bold.ttf',true);
46 $this->AddFont('DejaVu','BI','DejaVuSans-BoldOblique.ttf',true);
47 $this->AddFont('DejaVuCond','','DejaVuSansCondensed.ttf',true);
48 $this->AddFont('DejaVuCond','B','DejaVuSansCondensed-Bold.ttf',true);
49 $this->AddFont('DejaVuCond','I','DejaVuSansCondensed-Oblique.ttf',true);
50
51 $this->cn = $p_cn;
52 $this->own = new Noalyss_Parameter_Folder($this->cn);
53 $this->soc = $this->own->MY_NAME;
54 $this->date = date('d.m.Y');
55 }
56 function Header()
57 {
58 //Arial bold 12
59 $this->SetFont('DejaVu', 'B', 10);
60 //Title
61 $this->Cell(0,10,$this->dossier, 'B', 0, 'C');
62 //Line break
63 $this->Ln(20);
64 }
65 function Footer()
66 {
67 //Position at 2 cm from bottom
68 $this->SetY(-20);
69 //Arial italic 8
70 $this->SetFont('DejaVuCond', 'I', 8);
71 //Page number
72 $this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
73 $this->Ln(3);
74 // Created by NOALYSS
75 $this->Cell(0,8,'Created by NOALYSS, online on https://www.noalyss.eu',0,0,'C',false,'https://www.noalyss.eu');
76
77 }
78}
$input_from cn
Class to manage the company parameter (address, name...)
API for creating PDF, unicode, based on tfpdf.
Definition pdf.class.php:34
PDF in landscape mode.
__construct($p_cn=null, $orientation='L', $unit='mm', $format='A4')