Hello,
I have tried to use Prince with PHP trying to translate an html document to a pdf document, but it does not work at all.
It says "Prince instantiation OK" and nothing more happens.
I get the message : "sh: : command not found".
Here is my code :
Thanks for your help.
Best regards
I have tried to use Prince with PHP trying to translate an html document to a pdf document, but it does not work at all.
It says "Prince instantiation OK" and nothing more happens.
I get the message : "sh: : command not found".
Here is my code :
<?php
include_once "prince.php";
//---------------------------------
// lecture du fichier html et traduction en PDF
//-------------------------------------------
$filetosend="export.pdf";
$filename="/modeles/classique_html.html";
$msgs=array();
$dats=array();
$prince=new Prince('');
if(!$prince) die("<p>Prince instantiation failed</p>");
else echo "Prince instantiation OK<br />";
$prince->setHTML(1);
$prince->setLog('prince.log');
$ok=$prince->convert_file_to_file($filename,$filetosend, $msgs, $dats);
if ($ok) echo "fichier cree"; else echo "erreur de creation du fichier";
?>
Thanks for your help.
Best regards