Issue
I am developing a PHP web application with CakePHP 3.4 framework, and i am using wkhtmltopdf 0.12.4 to output dynamic content in a .pdf file. Currently i'm using three different environments where i develop and test my application:
- In my local environment (XAMPP 32-bit for Windows), wkhtmltopdf works great. It takes ~1 second in rendering .pdf files
- In a remote testing environment (CentOS 7 64-bit using apache2, 4GB memory), works great too.
- In my third remote testing environment (Another CentOS 7 64-bit distro with similar CPU specs as the second one and 4GB memory), wkhtmltopdf takes up to 20 seconds in rendering the same .pdf file
What could be causing this behavior in the third environment? How can i monitor or debug wkhtmltopdf process to help me identify why .pdf rendering is so slow?
Solution
Remove rgba and set border-radius to 1px in your CSS files (or completely remove them if they are not needed). That should speed up the PDF generation process.
Answered By - szk42 Answer Checked By - Mary Flores (WPSolving Volunteer)