WhiteOctoberTCPDFBundle icon indicating copy to clipboard operation
WhiteOctoberTCPDFBundle copied to clipboard

Images are no longer included

Open michlschmid opened this issue 12 years ago • 2 comments

After upgrading to Symfony 2.3 and the current WhiteOctoberTCPDFBundle release (0e82ad14ad19ad752e7d35656a252100c8578e8b) my PDF throw the following error during the rendering in Symfony:

TCPDF ERROR: [Image] Unable to get image: /usr/local/symfony/2.3/enetz/app/../vendor/tecnick.com/tcpdf/examples/images/bundles/enetzresource/images/allgaeuer-kraftwerke_logo.png

The source code which causes this is:

$pdf->SetHeaderData("bundles/enetzresource/images/allgaeuer-kraftwerke_logo.png", '', 'RSS Reader Report', $title_page);

That code worked fine until the updated. Can't find any hints on config changes or sth like that.

Thank for any help!

Regards,

Michl

michlschmid avatar Jul 23 '13 07:07 michlschmid

Same problem here!

scrnet avatar Jul 25 '17 11:07 scrnet

@vlabmichl, @scrnet Does it help if you add a slash at the start of your path? I.e. making it:

$pdf->SetHeaderData("/bundles/enetzresource/images/allgaeuer-kraftwerke_logo.png", '', 'RSS Reader Report', $title_page);

That way it'll look in the bundles folder under your web-root, which is probably what you want.

sampart avatar Aug 07 '17 15:08 sampart