return $this->getJob()->getMobileFirstRatio();
}
+
+
public function makeOptimizedSVGFile($out) {
$in = $this->makeSVGFile();
SVGTools::optimizeSVGImages($in, $out, $this->getResolution());
- $beforeOpt = str_replace('.svg', '.orig.svg', $out);
- copy($out, $beforeOpt);
SVGTools::optimizeSVG($out, $out);
}
public static function _optimizeSVG($in, $out) {
+ $beforeOpt = str_replace('.svg', '.orig.svg', $in);
+ copy($in, $beforeOpt);
+
$svg = shell_exec('timeout -s 1 120 ' . FluidbookTools::tools_path('svgcleaner/svgcleaner', true) . ' --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout ' . $in);
if (!$svg) {
$svg = file_get_contents($in);
$cli->setArg('s', $source);
$cli->setArg('d', $dest);
$cli->execute();
- if(!stristr($cli->getOutput(),'done')){
+ if (!stristr($cli->getOutput(), 'done')) {
$cli->dd();
}