TCPDF insert image to content

its-webtime 02 Jun, 2014
Hi,

I'm playing arround with the TCPDF Action and so far it looks great. I only have two questions.

1. How can I insert an image to the content? It should be on the right side at the top, but above the header.
I already tried with HTML-code, but couldn't get it running.
Anyone an idea?

2. Is it possible to remove the pagenumbers at the bottom? In tcpdf.php I found that commenting line 4272 out will remove it, but also the horizontal line. I would like to keep the line. The line looks like this:
$this->Cell(0, 0, $this->getAliasRightShift().$pagenumtxt, 'T', 0, 'R');


Thanks in advance,
Viktor
its-webtime 02 Jun, 2014
Hi again,

sorry, I forgot to mention the error I get when I try to insert an image:

Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /.../administrator/components/com_chronoforms5/chronoforms/actions/tcpdf/tcpdf/tcpdf.php on line 7542

Strict Standards: Imagick::clone method is deprecated and it's use should be avoided in /.../administrator/components/com_chronoforms5/chronoforms/actions/tcpdf/tcpdf/tcpdf.php on line 8251
TCPDF ERROR: Some data has already been output, can't send PDF file
Max_admin 05 Jun, 2014
Hi Viktor,

#1- please check with your host admin about this error, its related to server config!
#2- did you check the settings in the CF action admin ? if there is no setting to disable it then you will have to hack the action code!😟

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
its-webtime 05 Jun, 2014
Hi Max,

thanks for your reply.

I remember that the first message does not apprear if I link to the image with /images/... instead of with the full ink (http://www..). I'll check this.

But the second message is not so easy. Yes, in the mentioned line there is written:
$imga = $img->clone();


But where is it deprecated? Any idea how I can find this out?

Thanks, viktor
its-webtime 05 Jun, 2014
Answer
Hi again,

I've got it.

In the mentioned php file in line 8251 I changed this:
$imga = $img->clone();

to this:
$imga = clone $img;

And now it's running!

Source: https://github.com/jlabedo/tcpdf/pull/1/files

And the first message, as I said, can be solved by using a relative url.


Thanks for your help guys!
This topic is locked and no more replies can be posted.