I have my basic page on one server but want to keep prince on another server. I get errors when trying to call Prince from another server. How should this be handled?
Part of my current conversion script:
Part of my current conversion script:
error_reporting(E_ALL ^ E_NOTICE);
ini_set("display_errors", 1);
require_once("/Library/WebServer/Documents/htdocs/prince/prince.php");
$oPrince = new Prince("/Library/WebServer/Documents/htdocs/prince/bin/prince");
$oPrince->setHTML(true);
$oPrince->setLog("/Library/WebServer/Documents/htdocs/prince/prince.log");
$oPrince->addStyleSheet("/Library/WebServer/Documents/htdocs/phptest2/css/print.css");
$iType = 0;
if($iType == 0)
{
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=AR".notyr(CYstart,CYfin).".pdf");
chdir("/Library/WebServer/Documents/htdocs/prince/bin/");
$bSuccess = $oPrince->convert3($stringData);
echo ($bSuccess ? "Success<br>\n" : "Failure<br>\n");
}
else
{
$bSuccess = $oPrince->convert2($_SERVER['HTTP_REFERER'], "/tmp/test.pdf", $aMessages);
header("Location: /tmp/test.pdf");
echo ($bSuccess ? "Success<br>\n" : "Failure<br>\n");
echo "<pre>";
var_dump($aMessages);
echo "</pre>";
}
}
exit();
?>