Forums

Image as Header in TCPDF action

davidakis 08 May, 2014
Hi to all, I'm not sure this is the right place for that question. Is it possible to set an image as header of PDF file created using TCPF action in Chronoforms? If so, how could I do this?

Thank you for any suggestion
GreyHead 09 May, 2014
Hi davidakis,

I think it probably is possible using and <img> tag in the HTML. Have you tried that?

Bob
davidakis 09 May, 2014
Hi Bob,
thanks always for your support.
Actually in the 'Contents' box of the action you can write also PHP code. That's what I did to create PDF content using form->data['array'] method; I just checked that trying to set <img> tag in 'Header' box of the action doesn't work as expected. So I think to do this you can either modify the TCPDF action or write some code in 'Contents' box

I'm going to check the TCPDF action code to find the best method. Thanks a lot.
jensfx 02 Aug, 2014
hi ...
i looking also for a possibility to have an image in header and footer at the the pdf export.
image withhin the containt is working fine.

------------------
i read that i can use the php code in the containts at the tcpdf , but this didnt work for me .

i see the examples here how to creat an image in a header :
http://www.tcpdf.org/examples/example_003.phps


or see at bottom the code part. but this didnt work at the v5 of chronos for me.

//Page header
public function Header() {
// Logo
$image_file = K_PATH_IMAGES.'logo_example.jpg';
$this->Image($image_file, 10, 10, 15, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
// Set font
$this->SetFont('helvetica', 'B', 20);
// Title
$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');
}
This topic is locked and no more replies can be posted.