Support Services

Fast and professional to support your business
Welcome, Guest
Username: Password: Remember me

TOPIC: TCPDF ERROR: Not a JPEG file: /home/tophost7/public_html/whmcs/images/logo.jpg

TCPDF ERROR: Not a JPEG file: /home/tophost7/public_html/whm​cs/images/logo.jpg 5 years 11 months ago #3590

Hi,

I have this error when going to "Complete Order" if "Tick to send PDF versions of invoices along with invoice emails" is enabled...it will convert PDF to INVOICE and print OK. but will not Download or Send PDF via email... I've already tried to rename the JPEG file from jpg...not good...any ideas? Thanks.

Vasi
The administrator has disabled public write access.

Re: TCPDF ERROR: Not a JPEG file: /home/tophost7/public_html/whm​cs/images/logo.jpg 5 years 11 months ago #3598

  • a-webhost
  • a-webhost's Avatar
  • Offline
  • Junior Boarder
  • Hello
  • Posts: 30
  • Karma: 0
did you changed something in invoicepdf.tpl? it must be like:
# Logo
$pdf->Image(ROOTDIR.'/images/logo.png',20,25);
or
type absolute path to logo in whmcs general settings.
hope this will help.
[url:k2b2zc2n]www.a-webhost.com[/url]
Looking for Business Partners Worldwide
PS. And Yes, Steven is my Super Hero
The administrator has disabled public write access.

Re: TCPDF ERROR: Not a JPEG file: /home/tophost7/public_html/whm​cs/images/logo.jpg 5 years 11 months ago #3602

Thanks for you help. No, I haven't changed anything in the "invoicepdf.tpl"...In the mean time time I'll keep trying...Any other ideas will be appreciated...
The administrator has disabled public write access.

TCPDF ERROR: Not a JPEG file: /home/tophost7/public_html/whm​cs/images/logo.jpg 5 years 11 months ago #3604

  • Justin
  • Justin's Avatar
  • Offline
  • User is blocked
  • Posts: 827
  • Thank you received: 1
  • Karma: 0
Check your URLs, paths, make sure everything is correct. I think what it means is that the logo.jpg is missing from that location so make sure it's there. That image is used when creating the PDF Invoice. You might try deleting all the files in your templates_c directory and clearing out any template cache. Another thing you might want to check is that safe mode is turned off. Just make sure you have the logo.jpg file in your whmcs/images/ directory and if you upgraded recently make sure all the files made it.

In your template folder for whichever template you are using, jwhmcs-default I assume, there's an invoicepdf.tpl file this:
<?php

# Logo
&#91;COLOR=red&#93;&#91;B&#93;$pdf->Image(ROOTDIR.'/images/logo.jpg',20,25);&#91;/B&#93;&#91;/COLOR&#93;

# Company Details
$pdf->SetFont('helvetica','',13);
$pdf->Cell(0,6,trim($companyaddress&#91;0&#93;),0,1,'R');
$pdf->SetFont('freesans','',8);
for ( $i = 1; $i <= count($companyaddress); $i += 1) {
    $pdf->Cell(0,4,trim($companyaddress&#91;$i&#93;),0,1,'R');
The bolded red is the code and it's looking for the logo.jpg image. Same name, same location. Make sure whatever image you are using as your logo is named logo.jpg and nothing else. If not, make a copy of your logo and upload it to the correct location. Your ROOTDiR should be your WHMCS URL which would be the full URL without https.
The administrator has disabled public write access.

Re: TCPDF ERROR: Not a JPEG file: /home/tophost7/public_html/whm​cs/images/logo.jpg 5 years 11 months ago #3629

Hi Justin,

It's all good now...it was a "silly update"...thank you all for your help...

Vasi
The administrator has disabled public write access.
Time to create page: 0.034 seconds
Powered by Kunena Forum