Subversion Repositories eFlore/Applications.cel

Rev

Rev 2459 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2459 Rev 2462
Line 1... Line 1...
1
<?php
1
<?php
2
 
-
 
-
 
2
// declare(encoding='UTF-8');
3
/**
3
/**
-
 
4
 * Classe permettant de générer des PDFs.
-
 
5
 *
-
 
6
 * @internal   Mininum PHP version : 5.2
4
* @category  PHP
7
 * @category   CEL
5
* @package   jrest
8
 * @package    Services
-
 
9
 * @subpackage Bibliothèques
-
 
10
 * @version    0.1
-
 
11
 * @author     Mathias CHOUET <mathias@tela-botanica.org>
6
* @author    Raphaël Droz <raphael@tela-botania.org>
12
 * @author     Raphaël Droz <raphael@tela-botania.org>
7
* @copyright 2013 Tela-Botanica
13
 * @author     Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
14
 * @author     Aurelien PERONNET <aurelien@tela-botanica.org>
9
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
15
 * @license    GPL v3 <http://www.gnu.org/licenses/gpl.txt>
-
 
16
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
-
 
17
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
10
*/
18
 */
11
 
-
 
12
// Include the main TCPDF library (search for installation path).
19
// Include the main TCPDF library (search for installation path).
13
date_default_timezone_set("Europe/Paris");
20
date_default_timezone_set('Europe/Paris');
14
require_once('tcpdf_config.php');
21
require_once('tcpdf_config.php');
15
require_once('tcpdf/tcpdf.php');
22
require_once('tcpdf/tcpdf.php');
Line 16... Line 23...
16
 
23
 
Line 27... Line 34...
27
		$pdf->SetAuthor($utilisateur ? $utilisateur['prenom'] . ' ' . $utilisateur['nom'] : 'CEL - Tela Botanica');
34
		$pdf->SetAuthor($utilisateur ? $utilisateur['prenom'] . ' ' . $utilisateur['nom'] : 'CEL - Tela Botanica');
28
		$pdf->SetTitle('Observations en étiquettes');
35
		$pdf->SetTitle('Observations en étiquettes');
29
		$pdf->SetSubject('Étiquettes des observations');
36
		$pdf->SetSubject('Étiquettes des observations');
30
		$pdf->SetKeywords('botaniques, observations, étiquettes, cel, tela-botanica');
37
		$pdf->SetKeywords('botaniques, observations, étiquettes, cel, tela-botanica');
Line 31... Line -...
31
 
-
 
32
		// set default header data
-
 
33
		// $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 005', PDF_HEADER_STRING);
-
 
34
 
-
 
35
		// set header and footer fonts
-
 
36
		// $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
-
 
37
		// $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
-
 
38
 
-
 
39
		// set default monospaced font
38
 
Line 40... Line 39...
40
		$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
39
		$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
41
 
40
 
42
		// set margins
41
		// set margins
43
		$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
42
		$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
Line 44... Line -...
44
		$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
-
 
45
		$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
-
 
46
 
43
		$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
Line 47... Line 44...
47
		// set auto page breaks
44
		$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
48
		// $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
45
 
49
		$pdf->SetAutoPageBreak(FALSE, PDF_MARGIN_BOTTOM);
46
		$pdf->SetAutoPageBreak(FALSE, PDF_MARGIN_BOTTOM);
Line 56... Line 53...
56
		$pdf->setEqualColumns(2);
53
		$pdf->setEqualColumns(2);
Line 57... Line 54...
57
 
54
 
58
		$this->pdf = $pdf;
55
		$this->pdf = $pdf;
Line 59... Line -...
59
	}
-
 
60
 
-
 
61
 
56
	}
62
 
57
 
Line 63... Line 58...
63
	function export($obs) {
58
	public function export($obs) {
64
		$pdf = &$this->pdf;
59
		$pdf = &$this->pdf;
65
 
60