A way to optimize PDF generation with purePDF is to split the work of generating purePDF components into pieces, creating components from time to time, and the main problem is fixed by resizing the image
As the images take time to embed in the PDF, and the time spent on these processes is directly proportional to the size of the image.
So, first reduce the size of the image, and then paste it into the PDF (keep in mind if the sizes are reduced to a large scale, this will significantly reduce the quality of the image), continue to experiment to get the optimal size in order to have good enough quality and PDF generation speed.
The last thing to avoid transparent images, since they need more processing, use only transparency, if otherwise you need to use images with a white background.
Badr
source share