Commit 35414fc4 by vuj

pdf druck: inkscape text to patrh in einzelne svgs ausgelagert kurz vor massensvg

1 parent 3cd29237
......@@ -2,8 +2,14 @@
class mcCairoSvg {
public static function inkscapeSvgToPdf($param_input_filename, array $param_outputfile=null, array $param_quality =null) {
public static function inkscapeSvgToPdf($param_input_filename, array $param_outputfile=null, array $param_quality =null,$param_keep_svg=false) {
if($param_keep_svg !==TRUE){
$normalsvg_filename =mcInkscape::inkscapeSvgToNormalSvg($param_input_filename);
// $normalsvg_filename=$param_input_filename;
}else{
$normalsvg_filename=$param_input_filename;
}
mcFile::manipulateOutputfileArray($param_outputfile, $param_input_filename);
return mcCairoSvg::svgToPdf($normalsvg_filename, $param_outputfile, $param_quality);
}
......
......@@ -89,6 +89,27 @@ class mcInkscape {
return $outfile;
}
public static function inkscapeSvgToNormalSvgPrint($param_content) {
$param_input_filename= mcFile::createTmpFile(array('prefix'=>'in_'.uniqid(),'filenameextension'=>'.svg','dirname'=>'media/tmp'));
$param_outputfile= mcFile::createTmpFile(array('prefix'=>'out_'.uniqid(),'filenameextension'=>'.svg','dirname'=>'media/tmp'));
$doc = new DOMDocument();
$doc->loadXML($param_content);
$doc->save($param_input_filename);
self::replaceInSvGFile($param_input_filename);
$inkscape_order = "inkscape -T " . $param_input_filename . " -l " . $param_outputfile . " ";
$shell_exec = mcBash::shell_exec($inkscape_order);
$svgfile_content = mcFile::getFileContent($param_outputfile, true);
unlink($param_input_filename);
unlink($param_outputfile);
return $svgfile_content;
}
public function replaceInSvGFile($param_input_filename) {
$replacearray = array(
'flowpara' => 'flowPara',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!