Hi, i've installate tcpdf action and it works.
But i've the necessity to show in pdf an image sign according to user selected in a drop down.
I've add in body of tcpdf action the code <?php ?> and inside using echo showing different img path but it not works.. it print the php code on pdf... there is a way to use php in body of tcpdf?
But i've the necessity to show in pdf an image sign according to user selected in a drop down.
I've add in body of tcpdf action the code <?php ?> and inside using echo showing different img path but it not works.. it print the php code on pdf... there is a way to use php in body of tcpdf?
Hi parsifaltheking,
No, I don't think so. but you can use a Custom Code action before the TCPDF action, put the PHP in there and add the result to the $form->data[''] array e.g. $form->data['image'] = . . .; Then you can use {image} in the TCPDF body.
Bob
No, I don't think so. but you can use a Custom Code action before the TCPDF action, put the PHP in there and add the result to the $form->data[''] array e.g. $form->data['image'] = . . .; Then you can use {image} in the TCPDF body.
Bob
In custom code before tcpdf i've add
Parse error: syntax error, unexpected '" ></td><td></td></tr>"' (T_CONSTANT_ENCAPSED_STRING) in /var/www/vhosts/netservices.it/httpdocs/joomla/administrator/components/com_chronoforms5/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 5
and not work.
if ($form->data['tecnico'] == 'Andrea') {
$form->data['image'] ="<tr><td><img src="/file/firmaa.jpg" ></td><td></td></tr>";
}
elsif ($form->data['tecnico'] == 'Claudio') OR ($form->data['tecnico'] == 'Claand'){
$form->data['image'] ="<tr><td><img src="/file/firmac.jpg" ></td><td></td></tr>";
}
else {}
and in tcpdf body i've used {image} but i've this error:
Parse error: syntax error, unexpected '" ></td><td></td></tr>"' (T_CONSTANT_ENCAPSED_STRING) in /var/www/vhosts/netservices.it/httpdocs/joomla/administrator/components/com_chronoforms5/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 5
and not work.
Hi parsifaltheking,
Please check your typing, you can't use "" inside "" in the <img> string and it should be elseif, not elsif
Bob
Please check your typing, you can't use "" inside "" in the <img> string and it should be elseif, not elsif
Bob
Thank's i've correct the error and now it works.. but i've another problem:
1) how i can pass a text to footer section of tcpdf document?
2) how i can do to obtain on pdf created a carriage return of text? because i've a text in input textfield in witch i go to return carriage but on pdf all is on the same line..
Thanks
1) how i can pass a text to footer section of tcpdf document?
2) how i can do to obtain on pdf created a carriage return of text? because i've a text in input textfield in witch i go to return carriage but on pdf all is on the same line..
Thanks
This topic is locked and no more replies can be posted.