We use symfony 2 and alos use the symfony pdf helper when i create the invoce it's showing issue on images path

43 Views Asked by At

We are using symfony 2 and also using the symfony pdf helper. When i create the invoice it's showing issue on images path. Please let me know if any details needs to be added.

<table style="width:100%;">
    <tr style="text-align:center;">
        <td style="text-align:center; font:bold 22px 'Cambria'; line-height:22px;">Invoice</td>
    </tr>
    <tr style="text-align:left;">
        <th style="float:left;">
          <img style="width:150px; height:50px; text-align:left; position:absolute; left:45px; margin-bottom:15px;" src="{{asset('newdesign/images/modifiedtrademarklogo310x86.png')}}"/>
       <img style="width:150px; height:50px; text-align:left; position:absolute; left:45px; margin-bottom:15px;" src="{{asset('newdesign/images/modifiedtrademarklogo310x86.png')}}"/>
        </th>

    </tr>
</table>
<table style="width:100%; margin-top:15px;">
    <tr><td>Trademarkclick.com</td></tr>
    <tr><td>96 Basement, Sukhdev Vihar,</td></tr>
    <tr><td>New Delhi - 110025</td></tr>
    <tr><td>011-41085620</td></tr>
    <tr><td>GSTIN - 07AJXPB5138L2Z</td></tr>
</table>

enter image description here

1

There are 1 best solutions below

0
On

use absolute url for image assets on symfony 2.7 {{ absolute_url(asset('css/pdf.min.css')) }} or symfony2 older {{ asset('css/pdf.min.css', absolute = true) }}