Ici j'utilise le dompdf pour générer des pdf avec un en-tête, un corps, un pied de page. Mais quand j'essaie d'ajouter le pied de page, il ne s'attache pas.Pied de page Dompdf non défini ..?
Il vient toujours avec le code du corps, Je veux mettre un pied de page en bas.
Quelqu'un peut-il comprendre où je me trompe avec le code ci-dessous?
code:
global $_dompdf_show_warnings;
global $_dompdf_debug;
global $_DOMPDF_DEBUG_TYPES;
global $_dompdf_warnings;
$_dompdf_show_warnings = FALSE;
require_once(realpath(APPPATH."third_party/dompdf")."/dompdf_config.inc.php");
spl_autoload_register('DOMPDF_autoload');
$dompdf = new DOMPDF();
$dompdf->set_paper("letter", "portrait");
$html = '<html>
<head>
<title>
</title>
</head>
`enter code here` <body style="margin:0; background-color:#ff9900; color:#ffffff;">
<div>
<div style="margin:15px;">
<div>
<span style="font-size:25px; font-weight:600;">
Hi, John
</span>
</div>
<div>
<span>
Your account statement is here.
</span>
</div>
<div style="margin-top:15px; border: 2px solid;border-radius:5px; padding:10px; position:absolute; diplay:block;">
<div style="float:left;">left</div>
<div style="float:right;">right</div>
</div>
</div>
</div>
<div style="background-color:#ffffff; color:#ff9900; position:fixed; bottom:0;width:100%;padding:10px;">
<div>
<span>
<b><i>This is a system generated statement.</i></b>
</span>
</div>
<div>
<span>
<b><i> If you have any queries, email [email protected]</i></b>
</span>
</div>
</div>
</body>
</html>';
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("dompdf_out.pdf", array("Attachment" => false));
Vous avez un texte aléatoire «Entrez le code ici» dans votre exemple de code? – BrianS