We have tried to render the pdf file without the picture, and it works perfectly in 1-2 seconds.
We have tried with different image formats (png, jpg, gif) and it takes 2-3 minutes in every case.
We have been doing some investigations, and we have seen that it spends all the time in this piece of code (in dompdf/src/Dompdf.php):
foreach ($this->tree->get_frames() as $frame) {
// Set up the root frame
if (is_null($root)) {
$root = Factory::decorate_root($this->tree->get_root(), $this);
continue;
}
// Create the appropriate decorators, reflowers & positioners.
Factory::decorate_frame($frame, $this, $root);
}
We also this it could be a problem from the loading process for the picture, I mean, the main diference between the local environment and the remote server is that in remote server we use https protocols and in local machine just http.
Thanks in advance :)