Hi all,
I have problem with placeholders ({}) in my html template. What i'm trying to do is use html template to generate pdf file. All this is happening in form php plugin
Everything is working if html cod is inside php code: like
//
include("mpdf/mpdf.php");
$mpdf=new mPDF();
$html='<p>My name is {firstname}</p>';
$mpdf->WriteHTML($html);
$mpdf->Output('test.pdf','F');
//
But if I call the html template file from a directory its not working.
Pdf file is showing: My name is {firstname}
//
include("mpdf/mpdf.php");
$mpdf=new mPDF();
$html = file_get_contents ('name_file.txt');
$mpdf->WriteHTML($html);
$mpdf->Output('test.pdf','F');
//
What is wrong. Help is needed.
Marek
I have problem with placeholders ({}) in my html template. What i'm trying to do is use html template to generate pdf file. All this is happening in form php plugin
Everything is working if html cod is inside php code: like
//
include("mpdf/mpdf.php");
$mpdf=new mPDF();
$html='<p>My name is {firstname}</p>';
$mpdf->WriteHTML($html);
$mpdf->Output('test.pdf','F');
//
But if I call the html template file from a directory its not working.
Pdf file is showing: My name is {firstname}
//
include("mpdf/mpdf.php");
$mpdf=new mPDF();
$html = file_get_contents ('name_file.txt');
$mpdf->WriteHTML($html);
$mpdf->Output('test.pdf','F');
//
What is wrong. Help is needed.
Marek