I recently ran into an issue where PDF downloads in the SuiteCRM were taking several minutes to generate. After some debugging, I found the root cause and wanted to share the solution with the community.
Root Cause
The delay was caused by an <img> tag in the PDF template using an HTTP URL like:
<img src="https://your-crm-domain/custom/themes/default/images/YourImage.png">
SuiteCRM uses TCPDF for PDF generation, which attempts to fetch images over HTTP/HTTPS. This introduces latency due to:
- Network calls (even to the same server)
- DNS resolution
- SSL/security scanning (e.g., SentinelOne, antivirus tools)
Solution
Switch the image source to a local file path instead of an HTTP URL:
<img src="custom/themes/default/images/YourImage.png">
Result
- PDF generation time reduced from minutes → seconds
- No more network-related delays
- Much smoother user experience
Key Takeaway
When working with SuiteCRM PDF templates:
Avoid HTTP/HTTPS image URLs
Use local file paths or base64 images
Hope this helps anyone facing similar performance issues!
Let me know if you’ve encountered other TCPDF quirks ![]()