Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1195 Rev 1499
Line 219... Line 219...
219
 
219
 
220
	//version WKHTMLtoPDF en ligne de commande
220
	//version WKHTMLtoPDF en ligne de commande
221
	private function transformerHtmlEnPdf() {
221
	private function transformerHtmlEnPdf() {
222
		$nom = $this->getNomRetenu();
222
		$nom = $this->getNomRetenu();
223
		file_put_contents($this->fichier_html, $this->html);
223
		file_put_contents($this->fichier_html, $this->html);
224
		$commande =	"{$this->wkhtml}  --replace 'nom' '$nom' --encoding utf-8  --footer-html {$this->piedepage} {$this->fichier_html} {$this->fichier_pdf}";
224
		$commande =	"xvfb-run {$this->wkhtml}  --replace 'nom' '$nom' --encoding utf-8  --footer-html {$this->piedepage} {$this->fichier_html} {$this->fichier_pdf}";
225
		$ret = -1;
225
		$ret = -1;
226
		$debug = array();
226
		$debug = array();
227
		exec($commande, $debug, $ret);
227
		exec($commande, $debug, $ret);
228
		//print_r( $debug ); echo $ret;
228
		//print_r( $debug ); echo $ret;
229
		$ok = ($ret == 0 || $ret == 2) ? true : false;
229
		$ok = ($ret == 0 || $ret == 2) ? true : false;
230
		return $ok;
230
		return $ok;
231
	}
231
	}
232
}
-
 
233
?>
232
}
-
 
233
?>