placeholders in html template

heero

New Member
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
 
If you want to make a PDF from a form/list, you should create a Fabrik template and put it in the Fabrik template folder, then select it in your form/list settings.
Clone an existing template and customise it the way you need. I don't think it will work with an html template.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top