class_mcInkscape.inc.php 437 Bytes
<?php

class mcInkscape {
	
	/**
	 * 
	 * @param string $param_svgFileString
	 */
	public static function svgToPng($param_in_svg, $param_out_png=false) {
		
		if($param_out_png === false) {
			$param_out_png = tempnam("/tmp", "mcInkscape_");
		}
		
		$inkscape_order = "inkscape $param_in_svg -e $param_out_png";
		$shell_exec = shell_exec($inkscape_order);	

		D::show($shell_exec, $inkscape_order);
		
		return $param_out_png;
	}
}

?>