Subversion Repositories eFlore/Applications.cel

Rev

Rev 1655 | Rev 1664 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1655 Rev 1661
Line 3... Line 3...
3
// Include the main TCPDF library (search for installation path).
3
// Include the main TCPDF library (search for installation path).
4
date_default_timezone_set("Europe/Paris");
4
date_default_timezone_set("Europe/Paris");
5
require_once('tcpdf_config.php');
5
require_once('tcpdf_config.php');
6
require_once('tcpdf/tcpdf.php');
6
require_once('tcpdf/tcpdf.php');
Line 7... Line 7...
7
 
7
 
8
set_time_limit(6);
8
//set_time_limit(6);
Line 9... Line 9...
9
Class GenerateurPDF {
9
Class GenerateurPDF {
Line 10... Line 10...
10
 
10
 
Line 129... Line 129...
129
 
129
 
130
	// singe la propriété CSS3 "text-overflow" : "ellipsis"
130
	// singe la propriété CSS3 "text-overflow" : "ellipsis"
131
	function elude($txt, $limite_lignes = 3) {
131
	function elude($txt, $limite_lignes = 3) {
Line -... Line 132...
-
 
132
		// echo strlen($txt) . ' '.  $this->getlinenb($txt) . ' ' . $limite_lignes . "\n";
132
		// echo strlen($txt) . ' '.  $this->getlinenb($txt) . ' ' . $limite_lignes . "\n";
133
 
133
 
134
		$cell_paddings = $this->pdf->getCellPaddings();
134
		$marge = $this->pdf->getCellPaddings()['T'] + $this->pdf->getCellPaddings()['B'];
135
		$marge = $cell_paddings['T'] + $cell_paddings['B'];
135
		$line_height = $this->pdf->getStringHeight($this->column_width, "a") - $marge;
136
		$line_height = $this->pdf->getStringHeight($this->column_width, "a") - $marge;
136
		if($limite_lignes > 1) {
137
		if($limite_lignes > 1) {
137
			$lim = $line_height * $limite_lignes + $marge; // $line_height + ($line_height - $marge) * ($limite_lignes - 1);
138
			$lim = $line_height * $limite_lignes + $marge; // $line_height + ($line_height - $marge) * ($limite_lignes - 1);
Line 150... Line 151...
150
 
151
 
151
 
152
 
152
	// TODO: affichage pays dans "localité"
153
	// TODO: affichage pays dans "localité"
153
	// ORDER BY id_observation
154
	// ORDER BY id_observation
154
	// italique pour nom d'espèce, mais pas auteur
155
	// italique pour nom d'espèce, mais pas auteur
155
	function doHTMLcell($obs) {
156
	function doHTMLcell(&$obs) {
Line 156... Line 157...
156
		$this->pdf->setCellMargins(0,0,0,0);
157
		$this->pdf->setCellMargins(0,0,0,0);