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 -... |
Line 7... |
- |
|
7 |
|
7 |
|
8 |
set_time_limit(6);
|
Line 8... |
Line 9... |
8 |
Class GenerateurPDF {
|
9 |
Class GenerateurPDF {
|
Line 9... |
Line 10... |
9 |
|
10 |
|
Line 37... |
Line 38... |
37 |
|
38 |
|
38 |
// set auto page breaks
|
39 |
// set auto page breaks
|
39 |
// $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
40 |
// $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
Line 40... |
Line 41... |
40 |
$pdf->SetAutoPageBreak(FALSE, PDF_MARGIN_BOTTOM);
|
41 |
$pdf->SetAutoPageBreak(FALSE, PDF_MARGIN_BOTTOM);
|
41 |
|
42 |
|
42 |
$pdf->SetFont('times', '', 12);
|
43 |
$pdf->SetFont('times', '', 11);
|
Line -... |
Line 44... |
- |
|
44 |
$pdf->setCellPaddings(1, 1, 1, 1);
|
- |
|
45 |
$pdf->setCellMargins(1, 1, 1, 1);
|
- |
|
46 |
|
43 |
$pdf->setCellPaddings(1, 1, 1, 1);
|
47 |
$pdf->AddPage();
|
44 |
$pdf->setCellMargins(1, 1, 1, 1);
|
48 |
$pdf->setEqualColumns(2);
|
Line 45... |
Line 49... |
45 |
|
49 |
|
46 |
$this->pdf = $pdf;
|
50 |
$this->pdf = $pdf;
|
47 |
}
|
- |
|
48 |
|
- |
|
Line 49... |
Line 51... |
49 |
|
51 |
}
|
50 |
|
52 |
|
51 |
function export($obs) {
|
53 |
|
52 |
$pdf = &$this->pdf;
|
54 |
|
53 |
$pdf->AddPage();
|
55 |
function export($obs) {
|
54 |
$pdf->setEqualColumns(2);
|
56 |
$pdf = &$this->pdf;
|
55 |
|
57 |
|
56 |
$i = 0;
|
58 |
$i = 0;
|
57 |
while($i < count($obs)) {
|
59 |
while($i < count($obs)) {
|
58 |
$pdf->selectColumn(0);
|
60 |
$pdf->selectColumn(0);
|
59 |
// Multicell test
|
61 |
// Multicell test
|
Line 60... |
Line 62... |
60 |
$this->docell($obs[$i++]); if(!isset($obs[$i])) break;
|
62 |
$this->doHTMLcell($obs[$i++]); if(!isset($obs[$i])) break;
|
61 |
$pdf->Ln();
|
63 |
$pdf->Ln();
|
62 |
$this->docell($obs[$i++]); if(!isset($obs[$i])) break;
|
64 |
$this->doHTMLcell($obs[$i++]); if(!isset($obs[$i])) break;
|
63 |
$pdf->Ln();
|
65 |
$pdf->Ln();
|
64 |
$this->docell($obs[$i++]); if(!isset($obs[$i])) break;
|
66 |
$this->doHTMLcell($obs[$i++]); if(!isset($obs[$i])) break;
|
65 |
/*$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 1, 1, '', '', true);
|
67 |
/*$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 1, 1, '', '', true);
|
66 |
$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 1, 1, '', '', true);*/
|
68 |
$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 1, 1, '', '', true);*/
|
67 |
|
69 |
|
68 |
$pdf->selectColumn(1);
|
70 |
$pdf->selectColumn(1);
|
Line 69... |
Line 71... |
69 |
$this->docell($obs[$i++]); if(!isset($obs[$i])) break;
|
71 |
$this->doHTMLcell($obs[$i++]); if(!isset($obs[$i])) break;
|
70 |
$pdf->Ln();
|
72 |
$pdf->Ln();
|
71 |
$this->docell($obs[$i++]); if(!isset($obs[$i])) break;
|
73 |
$this->doHTMLcell($obs[$i++]); if(!isset($obs[$i])) break;
|
Line -... |
Line 74... |
- |
|
74 |
$pdf->Ln();
|
- |
|
75 |
$this->doHTMLcell($obs[$i++]); if(!isset($obs[$i])) break;
|
- |
|
76 |
/*$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 0, 1, '', '', true);
|
- |
|
77 |
$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 0, 1, '', '', true);
|
- |
|
78 |
$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 0, 1, '', '', true);*/
|
- |
|
79 |
|
- |
|
80 |
if(isset($obs[$i])) $pdf->AddPage();
|
- |
|
81 |
}
|
- |
|
82 |
}
|
- |
|
83 |
|
- |
|
84 |
function getlinenb4($txt) {
|
- |
|
85 |
// store current object
|
- |
|
86 |
$this->pdf->startTransaction();
|
- |
|
87 |
// store starting values
|
- |
|
88 |
$start_y = $this->pdf->GetY();
|
- |
|
89 |
$start_page = $this->pdf->getPage();
|
- |
|
90 |
|
- |
|
91 |
$this->pdf->MultiCell($this->column_width, $h=0, $txt, $border=0, $align='L', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0);
|
- |
|
92 |
$end_y = $this->pdf->GetY();
|
- |
|
93 |
$end_page = $this->pdf->getPage();
|
- |
|
94 |
// calculate height
|
- |
|
95 |
$height = 0;
|
- |
|
96 |
if ($end_page == $start_page) {
|
- |
|
97 |
$height = $end_y - $start_y;
|
- |
|
98 |
} else {
|
- |
|
99 |
for ($page=$start_page; $page <= $end_page; ++$page) {
|
- |
|
100 |
$this->setPage($page);
|
- |
|
101 |
if ($page == $start_page) {
|
- |
|
102 |
// first page
|
- |
|
103 |
$height = $this->pdf->h - $start_y - $this->pdf->bMargin;
|
- |
|
104 |
} elseif ($page == $end_page) {
|
- |
|
105 |
// last page
|
- |
|
106 |
$height = $end_y - $this->pdf->tMargin;
|
- |
|
107 |
} else {
|
- |
|
108 |
$height = $this->pdf->h - $this->pdf->tMargin - $this->bMargin;
|
- |
|
109 |
}
|
- |
|
110 |
}
|
- |
|
111 |
}
|
- |
|
112 |
// restore previous object
|
- |
|
113 |
$this->pdf = $this->pdf->rollbackTransaction();
|
- |
|
114 |
return $height;
|
- |
|
115 |
}
|
- |
|
116 |
|
- |
|
117 |
function getlinenb3($txt) {
|
- |
|
118 |
return $this->pdf->getStringHeight($this->column_width, $txt);
|
- |
|
119 |
}
|
- |
|
120 |
|
- |
|
121 |
function getlinenb2($txt) {
|
- |
|
122 |
//var_dump($line, $this->pdf->GetStringWidth($line));
|
- |
|
123 |
return ceil($this->pdf->GetStringWidth($txt) / $this->column_width);
|
- |
|
124 |
}
|
- |
|
125 |
|
- |
|
126 |
function getlinenb($txt) {
|
- |
|
127 |
return $this->pdf->getStringHeight('', $txt) / ($this->pdf->getFontSize() * $this->pdf->getCellHeightRatio());
|
- |
|
128 |
}
|
- |
|
129 |
|
- |
|
130 |
// singe la propriété CSS3 "text-overflow" : "ellipsis"
|
- |
|
131 |
function elude($txt, $limite_lignes = 3) {
|
- |
|
132 |
// echo strlen($txt) . ' '. $this->getlinenb($txt) . ' ' . $limite_lignes . "\n";
|
- |
|
133 |
|
- |
|
134 |
$marge = $this->pdf->getCellPaddings()['T'] + $this->pdf->getCellPaddings()['B'];
|
- |
|
135 |
$line_height = $this->pdf->getStringHeight($this->column_width, "a") - $marge;
|
- |
|
136 |
if($limite_lignes > 1) {
|
- |
|
137 |
$lim = $line_height * $limite_lignes + $marge; // $line_height + ($line_height - $marge) * ($limite_lignes - 1);
|
- |
|
138 |
} else {
|
- |
|
139 |
$lim = $line_height + $marge;
|
- |
|
140 |
}
|
- |
|
141 |
|
72 |
$pdf->Ln();
|
142 |
while(strlen($txt) > 4 && ($nb = $this->getlinenb3(strip_tags($txt))) > $lim) {
|
73 |
$this->docell($obs[$i++]); if(!isset($obs[$i])) break;
|
143 |
//echo "$nb / $line_height: $txt\n";
|
74 |
/*$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 0, 1, '', '', true);
|
- |
|
75 |
$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 0, 1, '', '', true);
|
144 |
// TODO: mb_internal_encoding()
|
- |
|
145 |
$txt = mb_substr($txt, 0, -4, 'UTF-8') . '…';
|
- |
|
146 |
}
|
- |
|
147 |
//echo "$txt: $nb / $limite_lignes \n";
|
- |
|
148 |
return $txt;
|
- |
|
149 |
}
|
- |
|
150 |
|
- |
|
151 |
|
- |
|
152 |
// TODO: affichage pays dans "localité"
|
- |
|
153 |
// ORDER BY id_observation
|
- |
|
154 |
// italique pour nom d'espèce, mais pas auteur
|
- |
|
155 |
function doHTMLcell($obs) {
|
- |
|
156 |
$this->pdf->setCellMargins(0,0,0,0);
|
- |
|
157 |
$width = $this->column_width = 98;
|
- |
|
158 |
|
- |
|
159 |
//echo "cell_padding['T']: " . $this->pdf->getCellPaddings()['T'] . ", cell_padding['B']: " . $this->pdf->getCellPaddings()['B'] . "\n";
|
- |
|
160 |
|
- |
|
161 |
$lh = $this->pdf->getFontSize() * $this->pdf->getCellHeightRatio();
|
- |
|
162 |
//$lh = $this->pdf->GetLineWidth();
|
76 |
$pdf->MultiCell(0, 25, self::doTemplate($obs), 1, 'L', 0, 1, '', '', true);*/
|
163 |
|
- |
|
164 |
/*
|
- |
|
165 |
var_dump($this->pdf->GetLineWidth(),
|
- |
|
166 |
$this->pdf->GetCharWidth("a"),
|
- |
|
167 |
$this->pdf->getStringHeight(60, "Ê"),
|
- |
|
168 |
$this->pdf->getHTMLFontUnits("plop"),
|
- |
|
169 |
$this->pdf->GetStringWidth("aa"),
|
- |
|
170 |
$lh,
|
- |
|
171 |
|
- |
|
172 |
5,
|
- |
|
173 |
$this->getlinenb4("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum..."),
|
- |
|
174 |
$this->elude("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum...", 5),
|
- |
|
175 |
|
- |
|
176 |
4,
|
- |
|
177 |
$this->getlinenb4("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor"),
|
- |
|
178 |
$this->elude("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum...", 4),
|
- |
|
179 |
|
- |
|
180 |
3,
|
- |
|
181 |
$this->getlinenb4("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet"),
|
- |
|
182 |
$this->elude("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum...", 3),
|
- |
|
183 |
|
- |
|
184 |
2,
|
- |
|
185 |
$this->getlinenb4("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore"),
|
- |
|
186 |
$this->elude("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum...", 2),
|
- |
|
187 |
|
- |
|
188 |
1,
|
- |
|
189 |
$this->getlinenb4("Observation : Lorem ipsum dolor sit amet, consectetur"),
|
- |
|
190 |
$this->elude("Observation : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum...", 1)
|
- |
|
191 |
);
|
- |
|
192 |
die;
|
- |
|
193 |
*/
|
- |
|
194 |
|
- |
|
195 |
|
- |
|
196 |
/* $str = '<strong>Observation</strong> : ' . $obs['commentaire'];
|
- |
|
197 |
echo $this->getlinenb(strip_tags($str)) . "\n";
|
- |
|
198 |
echo $this->getlinenb2(strip_tags($str)) . "\n";
|
- |
|
199 |
echo $this->pdf->getStringHeight($width, strip_tags($str)) . "\n";
|
- |
|
200 |
echo $this->pdf->getStringHeight($width, "a") . "\n";
|
- |
|
201 |
echo ( $this->pdf->getStringHeight($width, strip_tags($str)) / $this->pdf->getStringHeight($width, "a")) . "\n";
|
- |
|
202 |
|
- |
|
203 |
die;*/
|
- |
|
204 |
|
- |
|
205 |
// 3ème paramètre = '' equivalent à $this->pdf->getX()
|
- |
|
206 |
// 4ème paramètre = '' equivalent à $this->pdf->getY()
|
- |
|
207 |
// famille
|
- |
|
208 |
$this->pdf->writeHTMLCell($w = $width - 20, '', '', '',
|
- |
|
209 |
$html = '<strong>Famille</strong> : ' . $obs['famille'],
|
- |
|
210 |
$border = 'LT', $ln = 0, $fill = false, $reset = true, $align = 'L', $autopadding = true);
|
- |
|
211 |
|
- |
|
212 |
|
- |
|
213 |
// N°: TODO: writeHTMLCell() semble bugger
|
- |
|
214 |
$this->pdf->Cell($w = 20, '',
|
- |
|
215 |
$txt = 'N° : ' . $obs['id_observation'], //. sprintf("%04d", $obs['ordre'])
|
- |
|
216 |
$border = 'TR', $ln = 1, $align = 'L', $fill = false, $link = false, $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
|
- |
|
217 |
/*$this->pdf->writeHTMLCell($w = 20, '', '', '',
|
- |
|
218 |
$html = '<strong>N°</strong> : ' . $obs['id_observation'], //. sprintf("%04d", $obs['ordre']),
|
- |
|
219 |
$border = 'TR', $ln = 1, $fill = true, $reset = true, $align = 'R', $autopadding = true);*/
|
- |
|
220 |
|
- |
|
221 |
// espece
|
- |
|
222 |
$this->pdf->writeHTMLCell($w = $width, $lh * 2.5, '', '',
|
- |
|
223 |
//$html = '<strong>Espèce</strong> : ' . self::elude('Espèce : ', $obs['nom_ret'], 2),
|
- |
|
224 |
$html = $this->elude('<strong>Espèce</strong> : ' . $obs['nom_ret'], 2),
|
- |
|
225 |
$border = 'RL', $ln = 1, $fill = false, $reset = true, $align = 'L', $autopadding = true);
|
- |
|
226 |
|
- |
|
227 |
// collecteur
|
- |
|
228 |
$this->pdf->writeHTMLCell($w = $width, '', '', '',
|
- |
|
229 |
$html = '<strong>Collecteur</strong> : ' . $obs['prenom_utilisateur'] . ' ' . $obs['nom_utilisateur'],
|
- |
|
230 |
$border = 'RL', $ln = 1, $fill = false, $reset = true, $align = 'L', $autopadding = true);
|
- |
|
231 |
|
- |
|
232 |
// localité
|
- |
|
233 |
$this->pdf->writeHTMLCell($w = $width, $lh * 3.5, '', '',
|
- |
|
234 |
//$html = "<strong>Localité</strong> : " .
|
- |
|
235 |
//self::elude('Localité : ', sprintf("%s (%s)\n%s, %s [%s]", $obs['zone_geo'], $obs['ce_zone_geo'], $obs['lieudit'], $obs['station'], $obs['milieu'] ), 3),
|
- |
|
236 |
// $html = self::elude(sprintf("<strong>Localité</strong> : %s (%s)\n%s, %s [%s]", $obs['zone_geo'], $obs['ce_zone_geo'], $obs['lieudit'], $obs['station'], $obs['milieu']), 3),
|
- |
|
237 |
$html = $this->elude(sprintf("<strong>Localité</strong> : %s (%s)", $obs['zone_geo'], $obs['ce_zone_geo']), 2) . "\n" .
|
- |
|
238 |
$this->elude(sprintf("%s, %s [%s]", $obs['lieudit'], $obs['station'], $obs['milieu']), 2),
|
- |
|
239 |
$border = 'RL', $ln = 1, $fill = false, $reset = true, $align = 'L', $autopadding = true);
|
- |
|
240 |
|
- |
|
241 |
// lon/lat
|
- |
|
242 |
$this->pdf->writeHTMLCell($w = $width, '', '', '',
|
- |
|
243 |
$html = sprintf("<strong>Latitude / Longitude</strong> : %s / %s", $obs['latitude'], $obs['longitude']),
|
- |
|
244 |
$border = 'RL', $ln = 1, $fill = false, $reset = true, $align = 'L', $autopadding = true);
|
- |
|
245 |
|
- |
|
246 |
// commentaire
|
- |
|
247 |
$this->pdf->writeHTMLCell($w = $width, $lh * 4.5, '', '',
|
- |
|
248 |
//$html = '<strong>Observation</strong> : ' . self::elude('Observation : ', $obs['commentaire']),
|
77 |
|
249 |
$html = self::elude('<strong>Observation</strong> : ' . $obs['commentaire'], 4),
|
78 |
if(isset($obs[$i])) $pdf->AddPage();
|
250 |
$border = 'RL', $ln = 1, $fill = false, $reset = true, $align = 'L', $autopadding = true);
|
Line 79... |
Line 251... |
79 |
}
|
251 |
|
80 |
}
|
252 |
// date
|
81 |
|
- |
|
82 |
// TODO: test plus grand nom d'espèce
|
- |
|
83 |
// ORDER BY id_observation
|
- |
|
84 |
// intitulé en gras
|
- |
|
85 |
// italique pour nom d'espèce, mais pas auteur
|
- |
|
86 |
// supprimer les lignes
|
- |
|
87 |
function docell($obs) {
|
253 |
$this->pdf->writeHTMLCell($w = $width, '', '', '',
|
88 |
$this->pdf->setCellMargins(0,0,0,0);
|
- |
|
89 |
|
- |
|
Line 90... |
Line 254... |
90 |
$this->pdf->Cell($w = 60, '',
|
254 |
$html = '<strong>Date</strong> : ' . strftime("%d/%m/%Y", strtotime($obs['date_observation'])),
|
91 |
$txt = 'Famille : ' . $obs['famille'],
|
255 |
$border = 'LBR', $ln = 1, $fill = false, $reset = true, $align = 'R', $autopadding = true);
|
92 |
$border = 1,
|
- |
|
93 |
$ln = 0,
|
- |
|
94 |
$align = 'L',
|
- |
|
95 |
$fill = false,
|
- |
|
96 |
$link = false,
|
- |
|
97 |
$stretch = 1,
|
- |
|
98 |
$ignore_min_height = false,
|
256 |
|
99 |
$calign = 'T',
|
- |
|
100 |
$valign = 'M');
|
- |
|
Line 101... |
Line 257... |
101 |
|
257 |
}
|
102 |
$this->pdf->Cell($w = 20, '',
|
258 |
|
103 |
$txt = 'N° : ' . $obs['id_observation'] /*. sprintf("%04d", $obs['ordre']) */,
|
- |
|
104 |
$border = 1,
|
- |
|
105 |
$ln = 1,
|
- |
|
106 |
$align = 'L',
|
- |
|
107 |
$fill = false,
|
- |
|
108 |
$link = false,
|
- |
|
109 |
$stretch = 1,
|
259 |
function docell($obs) {
|
110 |
$ignore_min_height = false,
|
- |
|
111 |
$calign = 'T',
|
- |
|
Line 112... |
Line 260... |
112 |
$valign = 'M');
|
260 |
$this->pdf->setCellMargins(0,0,0,0);
|
113 |
|
261 |
|
114 |
$this->pdf->Cell($w = 80, '',
|
- |
|
115 |
$txt = 'Espèce : ' . $obs['nom_ret'],
|
- |
|
116 |
$border = 1,
|
- |
|
117 |
$ln = 1,
|
- |
|
118 |
$align = 'L',
|
- |
|
119 |
$fill = false,
|
- |
|
120 |
$link = false,
|
262 |
$this->pdf->Cell($w = 60, '',
|
121 |
$stretch = 1,
|
- |
|
122 |
$ignore_min_height = false,
|
- |
|
Line 123... |
Line 263... |
123 |
$calign = 'T',
|
263 |
$txt = 'Famille : ' . $obs['famille'],
|
124 |
$valign = 'M');
|
264 |
$border = 'LT', $ln = 0, $align = 'L', $fill = false, $link = false, $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
|
125 |
|
- |
|
126 |
$this->pdf->Cell($w = 80, '',
|
265 |
|
127 |
$txt = 'Collecteur : ' . $obs['prenom_utilisateur'] . ' ' . $obs['nom_utilisateur'],
|
- |
|
128 |
$border = 1,
|
- |
|
129 |
$ln = 1,
|
- |
|
130 |
$align = 'L',
|
- |
|
131 |
$fill = false,
|
- |
|
132 |
$link = false,
|
- |
|
133 |
$stretch = 1,
|
- |
|
134 |
$ignore_min_height = false,
|
- |
|
135 |
$calign = 'T',
|
- |
|
Line 136... |
Line 266... |
136 |
$valign = 'M');
|
266 |
$this->pdf->Cell($w = 20, '',
|
137 |
|
267 |
$txt = 'N° : ' . $obs['id_observation'] /*. sprintf("%04d", $obs['ordre']) */,
|
138 |
$this->pdf->MultiCell(80, 20,
|
- |
|
139 |
$txt = sprintf("Localité : %s (%s)\n%s, %s",
|
- |
|
140 |
$obs['zone_geo'],
|
- |
|
141 |
$obs['ce_zone_geo'],
|
- |
|
142 |
$obs['lieudit'],
|
- |
|
143 |
$obs['station']),
|
- |
|
144 |
1,
|
268 |
$border = 'TR', $ln = 1, $align = 'L', $fill = false, $link = false, $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
|
145 |
'L',
|
- |
|
146 |
0,
|
- |
|
Line 147... |
Line 269... |
147 |
1,
|
269 |
|
148 |
'',
|
270 |
$this->pdf->Cell($w = 80, '',
|
149 |
'',
|
- |
|
150 |
true);
|
- |
|
151 |
|
- |
|
152 |
$this->pdf->Cell($w = 80, '',
|
- |
|
153 |
$txt = sprintf("Latitude, Longitude : %s / %s", $obs['latitude'], $obs['longitude']),
|
- |
|
154 |
$border = 1,
|
- |
|
155 |
$ln = 1,
|
271 |
$txt = 'Espèce : ' . $obs['nom_ret'],
|
Line 156... |
Line 272... |
156 |
$align = 'L',
|
272 |
$border = 'RL', $ln = 1, $align = 'L', $fill = false, $link = false, $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
|
157 |
$fill = false,
|
273 |
|
158 |
$link = false,
|
- |
|
159 |
$stretch = 1,
|
- |
|
160 |
$ignore_min_height = false,
|
- |
|
161 |
$calign = 'T',
|
- |
|
162 |
$valign = 'M');
|
- |
|
163 |
|
- |
|
164 |
$this->pdf->MultiCell(80, 20,
|
274 |
$this->pdf->Cell($w = 80, '',
|
165 |
$txt = self::coupeCommentaire("Observation : ", $obs['commentaire']),
|
- |
|
166 |
1,
|
- |
|
167 |
'L',
|
275 |
$txt = 'Collecteur : ' . $obs['prenom_utilisateur'] . ' ' . $obs['nom_utilisateur'],
|
Line 168... |
Line -... |
168 |
0,
|
- |
|
169 |
1,
|
- |
|
170 |
'',
|
- |
|
171 |
'',
|
- |
|
172 |
true);
|
- |
|
- |
|
276 |
$border = 'RL', $ln = 1, $align = 'L', $fill = false, $link = false, $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
|
173 |
|
277 |
|
174 |
$this->pdf->Cell($w = 80, '',
|
278 |
$this->pdf->MultiCell(80, 20,
|
175 |
$txt = 'Date : ' . strftime("%d/%m/%Y", strtotime($obs['date_observation'])),
|
279 |
$txt = sprintf("Localité : %s (%s)\n%s, %s", $obs['zone_geo'], $obs['ce_zone_geo'], $obs['lieudit'], $obs['station']),
|
176 |
$border = 1,
|
280 |
$border = 'RL', 'L', 0, 1, '', '', true);
|
177 |
$ln = 1,
|
281 |
|
178 |
$align = 'R',
|
282 |
$this->pdf->Cell($w = 80, '',
|
Line 179... |
Line 283... |
179 |
$fill = false,
|
283 |
$txt = sprintf("Latitude, Longitude : %s / %s", $obs['latitude'], $obs['longitude']),
|
180 |
$link = false,
|
284 |
$border = 'RL', $ln = 1, $align = 'L', $fill = false, $link = false, $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
|