Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 845 Rev 1005
Line 131... Line 131...
131
	public function executerPdfExport(){
131
	public function executerPdfExport(){
Line 132... Line 132...
132
		
132
		
133
			$this->capturerParametresFormulaire();
133
			$this->capturerParametresFormulaire();
134
			$donnees = $this->obtenirDonnees();
134
			$donnees = $this->obtenirDonnees();
135
			$this->construireHtml($donnees);
135
			$this->construireHtml($donnees);
136
			$this->transformerHtmlEnPdf();
136
			if ($this->transformerHtmlEnPdf()) {
-
 
137
				$this->envoyerPdfAuNavigateur();
-
 
138
			}
-
 
139
			else {
-
 
140
				die('erreur de generation du fichier PDF');
137
			$this->envoyerPdfAuNavigateur();
141
			}
Line 138... Line 142...
138
	}
142
	}
139
	
143
	
Line 194... Line 198...
194
		$this->fichier_html = $this->chemin_pdf.''.$nom_fichier.'-'.$time.'.html';
198
		$this->fichier_html = $this->chemin_pdf.''.$nom_fichier.'-'.$time.'.html';
195
		$this->fichier_pdf = $this->chemin_pdf.''.$nom_fichier.'-'.$time.'.pdf';
199
		$this->fichier_pdf = $this->chemin_pdf.''.$nom_fichier.'-'.$time.'.pdf';
196
		$nom = $this->getNomRetenu();
200
		$nom = $this->getNomRetenu();
197
		file_put_contents($this->fichier_html, $this->html);
201
		file_put_contents($this->fichier_html, $this->html);
198
		$commande =	"{$this->wkhtml}  --replace 'nom' '$nom' --encoding utf-8  --footer-html {$this->piedepage} {$this->fichier_html} {$this->fichier_pdf}";
202
		$commande =	"{$this->wkhtml}  --replace 'nom' '$nom' --encoding utf-8  --footer-html {$this->piedepage} {$this->fichier_html} {$this->fichier_pdf}";
-
 
203
		$ret = -1;
199
		$debug = exec($commande);
204
		$debug = array();
200
		//echo $debug;
205
		exec($commande, $debug, $ret);
-
 
206
		//print_r( $debug ); echo $ret;
-
 
207
		return ( $ret == 0 );
201
	}
208
	}
202
}
209
}
203
?>
210
?>
204
211