Page 1 of 1

How to put Logo in PDF invoice

Posted: 27 Feb 2020, 12:18
by Alexander
Dear Phoca Cart Gurus

I have customized the com_phocacart/layouts/order.php file and added, depending on the shop language, German and English information. I installed Phoca PDF and the PDF Plugin because I want to send orders and invoices as emails with attached PDFs. Everything works perfectly -> Great work, Jan!

I have a German and an English Shop Logo. As I can only set one Shop Logo in the Phoca Cart configuration I added the 2 logos in in the order.php file. Logos are 8-bit png files.
In the email (html) everything works perfectly, Logo in the correct shop language is displayed at the correct position.

Only problem is, that in the attached PDF the Logo is not displayed at all. Neither the German nor the English version.
I already tried to add them in different ways, as <div>, URL etc. to the $o[] array but nothing works. What am I doing wrong or what am I missing?

Thank you for your help

Alexander

Re: How to put Logo in PDF invoice

Posted: 29 Feb 2020, 14:13
by Jan
Hi, where exactly should the logo be displayed? Maybe try to check the path to the logos.

Jan

Re: How to put Logo in PDF invoice

Posted: 29 Feb 2020, 17:53
by Alexander
Hi Jan
it works perfectly in the html for emails. I would like to have it above the $store_title in the upper left side. ->
// -----------
// HEADER LEFT
// -----------

What path does the logo have to have? absolute https://"mysite"/images/logo_de.png or just /images/logo_de.png or images/logo_de.png?

Everything in the PDF works perfectly except the image/logo. Is there a special command to send images to the pdf generator?
I just put it in the $o[] array in order.php..

For the POS Logo you use:
// POS HEADER
if ($pR) {
$oPr[] = $pP->printImage($store_logo_pos);
}

Sorry, I'm not an expert generating PDFs.

Alexander

Re: How to put Logo in PDF invoice

Posted: 03 Mar 2020, 16:19
by Jan
But in which part of the PDF should the logo be displayed?

If in header or footer, this is set by PDF plugin settings. If inside e.g. vendor address, this is set in vendor address parameter.

Jan

Re: How to put Logo in PDF invoice

Posted: 19 Apr 2021, 18:45
by Alexander
Thank you, this thread can be marked as solved

Alexander

Re: How to put Logo in PDF invoice

Posted: 19 Apr 2021, 23:06
by Benno
Done!

Kind regards,
Benno