Cakephp DomPdf Css and Images

I have a question about css style and images on DomPdf, in localhost everything works, but whe I publish my site and access it remotly the genereated Pdf’s not load css or images.
How can solve it?

Do you have any sample code ? I tried a few PDF generates before, including DomPdf. Based on my experience, fpdf does the best job in terms of code->visual. Other code->visual doesn’t seem correct.

Hi of course.

In localhost it works, but accesing the domain name does not.


public function certificadoafiliaciones($id = null)




    $contrato = $this->Contratos->get($id);





            'orientation' => 'portrait',

            'download' => true, 

            'filename' => 'Certificado_Afiliaciones_Contrato_Id_' . $id . '.pdf' 





<?= $this->Html->image($empresaLogo, ['fullBase' => true]); ?> <?= $this->Html->css('pdf.css', ['fullBase' => true]) ?>

check the relative address of the css file on the server.if the it’s works on local then defiantly Path problem for css or. check the template/layout/pdf file paths.

I don’t have any template/layout/pdf


I find somethig with http it is fine inside and outside server, but with https css and images do not load on pdf…