1

Hi everyone,

i'm trying to convert a php variable into pdf using html2pdf but I've got an error message :
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in administration/test/html2pdf.class.php on line 22

here is the code i'm using :


$devis = $_POST['devis'];

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

Does someone has an idea how I can get this work ?

2

Are you sending a whole html block through a POST entry? confus

3

1- do you now what is PHP5 ? wink

2- converting directly a HTML block who is coming from a POST is dangerous with no protection on the size of the HTML, or on others points...

Ancien pseudo : lolo

4


Hi everyone,
Hi me also, i try to use html2pdf and i failed.
Do you have some ideas please.
I don't bknow how to use the code and which classes are necessery.

5

all the classes are on the zip file
Ancien pseudo : lolo