Line 156... |
Line 156... |
156 |
//++ ------------------------------------------------export en pdf--------------------------------------++
|
156 |
//++ ------------------------------------------------export en pdf--------------------------------------++
|
Line 157... |
Line 157... |
157 |
|
157 |
|
158 |
|
158 |
|
159 |
private function envoyerPdfAuNavigateur() {
|
159 |
private function envoyerPdfAuNavigateur() {
|
160 |
header('Content-type: application/pdf');
|
160 |
header('Content-type: application/pdf');
|
161 |
header('Content-Disposition: attachment; filename="'.$this->nom_retenu.'.pdf"');
|
161 |
header('Content-Disposition: attachment; filename='.str_replace(' ','_',$this->nom_retenu).'.pdf');
|
162 |
readfile($this->fichier_pdf);
|
162 |
readfile($this->fichier_pdf);
|
163 |
unlink($this->fichier_html);
|
163 |
unlink($this->fichier_html);
|
Line 172... |
Line 172... |
172 |
$this->fichier_html = $this->chemin_pdf.''.str_replace(' ','_',$this->nom_retenu).'-'.$time.'.html';
|
172 |
$this->fichier_html = $this->chemin_pdf.''.str_replace(' ','_',$this->nom_retenu).'-'.$time.'.html';
|
173 |
$this->fichier_pdf = $this->chemin_pdf.''.str_replace(' ','_',$this->nom_retenu).'-'.$time.'.pdf';
|
173 |
$this->fichier_pdf = $this->chemin_pdf.''.str_replace(' ','_',$this->nom_retenu).'-'.$time.'.pdf';
|
174 |
$nom = $this->nom_retenu;
|
174 |
$nom = $this->nom_retenu;
|
175 |
file_put_contents($this->fichier_html, $this->html);
|
175 |
file_put_contents($this->fichier_html, $this->html);
|
176 |
$commande =
|
176 |
$commande =
|
177 |
" {$this->wkhtml} --replace 'nom' '$nom' --footer-html '{$this->piedepage}' --encoding utf-8 {$this->fichier_html} {$this->fichier_pdf} 2>&1";
|
177 |
" {$this->wkhtml} --replace 'nom' '$nom' --footer-html {$this->piedepage} --encoding utf-8 {$this->fichier_html} {$this->fichier_pdf} 2>&1";
|
178 |
$debug = exec($commande);
|
178 |
$debug = exec($commande);
|
179 |
//echo $debug;
|
179 |
//echo $debug;
|
180 |
}
|
180 |
}
|