Get The Most Affordable Hosting in the World!

Starting at just $1.87/month, Vercaa offers unbeatable pricing for world-class web hosting services.

Fast, reliable, and secure hosting to power your website without breaking the bank. Plus, enjoy a free CDN for faster loading times worldwide!

Get Started Now!

Symptom

When downloading a PDF copy of a client's invoice after customizing the invoicepdf.tpl template file, you may encounter a TCPDF ERROR message:

TCPDF ERROR: [Image] Unable to get the size of the image: https://www.example.com/images/image-name.png
 

Cause

This error indicates that your server cannot use the cURL library function to load the logo image for inclusion in the PDF invoice. This could be due to a firewall configuration or similar security measures on the server or network.

To troubleshoot this issue:

  1. SSH in to your WHMCS installation's server.
  2. Execute the following command, replacing https://www.example.com/images/image-name.png with the URL of the logo image in the error message:
curl -v https://www.example.com/images/image-name.png
 

A successful result will include a 200 HTTP response code. For example:

* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200 
< date: Mon, 04 Oct 2021 10:01:22 GMT
< server: Apache/2
< last-modified: Mon, 29 Mar 2021 06:02:17 GMT
< etag: "42e6-5bea69fba6425"
< accept-ranges: bytes
< content-length: 17126
< cache-control: max-age=259200
< expires: Thu, 07 Oct 2021 10:01:22 GMT
< content-type: image/png
 

Resolution

Work with your system administrator or hosting provider to resolve any errors that the cURL test produces.

or

Adjust the customizations in the invoicepdf.tpl template file to use the relative path to the image instead of the full URL.

 
 
The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.
Was this answer helpful? 1 Users Found This Useful (1 Votes)