ILIAS
eassessment Revision 61809
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilFOPUtil.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
11
class
ilFOPUtil
12
{
13
17
function
getFOPCmd
()
18
{
19
return
PATH_TO_FOP;
20
}
21
28
function
makePDF
($a_from, $a_to)
29
{
30
$saved = getenv(
"JAVACMD"
);
// save old value
31
putenv(
"JAVACMD="
.PATH_TO_JAVA);
32
33
$fop_cmd =
ilFOPUtil::getFOPCmd
().
" -fo "
.
34
$a_from.
" -pdf "
.$a_to;
35
//echo $fop_cmd."<br>:";
36
37
//error_reporting(E_ALL);
38
39
/* Add redirection so we can get stderr. */
40
$handle
= popen($fop_cmd.
' 2>&1'
,
'r'
);
41
echo
"'$handle'; "
. gettype(
$handle
) .
"\n"
;
42
$read = fread(
$handle
, 2096);
43
echo $read;
44
pclose(
$handle
);
45
46
$ret
= exec($fop_cmd, $arr, $r2);
47
echo
$ret
.$r2;
48
echo
":"
;
49
var_dump($arr);
50
putenv(
"JAVACMD=$saved"
);
51
}
52
53
}
// END class.ilFOPUtil
54
?>
classes
class.ilFOPUtil.php
Generated on Mon Apr 25 2016 19:01:05 for ILIAS by
1.8.1.2 (using
Doxyfile
)