1

Bonjour,

Je reprends un projet en finalisation mais pas d'experience en php, le but est de donner au client internaute un compte rendu en pdf

Est il possible de passer le contenu d'une page diretement ?

voici mon code mais n'affiche qu'une page blanche

<?php
session_start();
ini_set("display_errors",0);error_reporting(0);

?>
<?php
ob_start();
?>
$contents ="<page>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>serveur de resultats</title>
</head>
<body>
<?php include ('language.php'); ?>
<?php
include ('configuration.php');
require ('Var_Dump.php'); // make sure the pear package path is set in php.ini
$_SESSION["ListOrigin"] = "";

include "include/functions.inc.php";
include "include/classes.inc.php";
include "language/".$lang."/defines.inc";
//echo $_GET['nummer']." ".$_SESSION['userid']." ".$_SESSION["dossier"];

$req_arr = explode (",", $_GET['nummer']);
$code = $_SESSION['userid'];
$rsaFile = getParameter('client', 'folder')."/RSA.ini";
$fromwhere = "RSANew/resultats.php";
$_SESSION["origin"]=$fromwhere;

//print_r($req_arr);
//$arr = array();
//for ($i=1;$i<=count($req_arr); $i++)
//{
// $x = "request".$i;
// if (${$x} != "") {
// array_push($arr,${$x});
// }
//}
krsort($req_arr);
//print_r ($req_arr);



define("OPEN", "open");
define("CLOSE", "close");

if (count($req_arr)>0)
{
$rto = 100;



if (count($req_arr)==1) {
$report = new Report($req_arr[0],$fromwhere,$rsaFile);


$xslfile = getParameter('client', 'folder')."/xsl/report".$_SESSION['lang'].".xsl";
$report->MakeXML($xslfile);


}
else
{
$report = new CumulReport($req_arr,$code,false,$rsaFile,$fromwhere);
$xslfile = getParameter('client', 'folder')."/xsl/cumulT_".$_SESSION['lang'].".xsl";
$report->MakeXML($xslfile);
$file = $content->xmlfile;
}



}
?>
</body>
</html>
</page>";









<?php

require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML($content);
ob_clean();
$html2pdf->Output('exemple.pdf');

?>

merci