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 generating a PDF invoice or quote (for example, during the daily automation cron tasks) you may encounter a maximum execution time exceeded fatal error:

Maximum execution time of 300 seconds exceeded in /path/to/whmcs/vendor/tecnickcom/tcpdf/tcpdf.php
 

Cause

This error may be due to a high-resolution logo image in the PDF file, increasing the necessary amount of time to generate the PDF file above the specified PHP max_execution_time configuration.

Solution

To resolve this issue, resize the logo image to smaller dimensions and reduce the filesize.

 

  • The logo image normally exists at /assets/img/logo.png or /assets/img/logo.jpg .
  • A logo with dimensions of 300 x 100 pixels is usually sufficient.

 

After you resize the image, upload the smaller logo image, overwriting the original larger logo image file.

If you have a customized PDF template, the logo image may have a different filename or location. Review the invoicepdf.tpl and quotepdf.tpl code to confirm whether the filename and folder path are customized and, if they are, adjust them accordingly.

 

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)