dongyijing2353 2011-09-09 10:43
浏览 433
已采纳

tcpdf没有正确地使用图像引用HTML文档 - PHP

My code to convert HMTL to PDF using tcpdf.

$html =  '<pre>
          <br/>
          <h3><a href="/node/02" title="View Original Document">aa</a></h3>
          <br/>
          <img width="628" height="674" class="imagecache imagecache-assetimage" title="" alt="" src="http://test/a_image/AssignPage.jpg" />&nbsp</pre>';

    $htm = '<div style="font-size:40px !important;">'.$html.'</div>';
    $pdf->writeHTML($htm, TRUE, TRUE, TRUE, FALSE, '');

Above code prints the following error message:

TCPDF ERROR: [Image] Unable to get image: /path-of-the-image

If HTML does not contains image it is working perfectly.

What to do to resolve this issue ?

Any help will be thankful and grateful...

Thanks in advance..

  • 写回答

1条回答 默认 最新

  • douhuan6305 2011-09-09 11:48
    关注

    Need to provide 777 permissions for cache folder located in tcfdf.

    And it works...

    thanks...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?