ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFOPUtil Class Reference

utility functions for xml-fo More...

+ Collaboration diagram for ilFOPUtil:

Public Member Functions

 getFOPCmd ()
 get fop command
 makePDF ($a_from, $a_to)
 convert fo file to pdf file

Detailed Description

utility functions for xml-fo

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilFOPUtil.php 20150 2009-06-08 18:02:33Z akill

Definition at line 11 of file class.ilFOPUtil.php.

Member Function Documentation

ilFOPUtil::getFOPCmd ( )

get fop command

Definition at line 17 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

Parameters
string$a_fromsource fo file
string$a_totarget pdf file

Definition at line 28 of file class.ilFOPUtil.php.

References $ret, and 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:


The documentation for this class was generated from the following file: