Public Member Functions | |
| getFOPCmd () | |
| get fop command | |
| makePDF ($a_from, $a_to) | |
| convert fo file to pdf file | |
Definition at line 32 of file class.ilFOPUtil.php.
| ilFOPUtil::getFOPCmd | ( | ) |
get fop command
Definition at line 38 of file class.ilFOPUtil.php.
Referenced by makePDF().
{
return PATH_TO_FOP;
}
Here is the caller graph for this function:| ilFOPUtil::makePDF | ( | $ | a_from, | |
| $ | a_to | |||
| ) |
convert fo file to pdf file
| string | $a_from source fo file | |
| string | $a_to target pdf file |
Definition at line 49 of file class.ilFOPUtil.php.
References getFOPCmd().
Referenced by ilContObjectExport::buildExportFilePDF().
{
$saved = getenv("JAVACMD"); // save old value
putenv("JAVACMD=".PATH_TO_JAVA);
$fop_cmd = ilFOPUtil::getFOPCmd()." -fo ".
$a_from." -pdf ".$a_to;
//echo $fop_cmd."<br>:";
//error_reporting(E_ALL);
/* Add redirection so we can get stderr. */
$handle = popen($fop_cmd.' 2>&1', 'r');
echo "'$handle'; " . gettype($handle) . "\n";
$read = fread($handle, 2096);
echo $read;
pclose($handle);
$ret = exec($fop_cmd, $arr, $r2);
echo $ret.$r2;
echo ":";
var_dump($arr);
putenv("JAVACMD=$saved");
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1