문제

I am trying to generate PDF from Excel, but I get the following error:

TCPDF ERROR: [Image] Unable to get image:./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg

Looking though Excel, I can find /var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg, but without the . before it. Can the dot be a reason that failed converting?

도움이 되었습니까?

해결책

./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg

The '.' before that means that it will be looking in current directory for a folder called var.

You will need to remove this . in order to begin at the root. Which is correct.

This is how it should look '/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg'

It looks like you are trying to use cURL to get the image, so i suggest you should try and change the image to be a URL such as http://URL of project folder/../0401b0ca555959f391752bb1b0ea9ba1.jpg

Other than that suggestion its hard to know what is happeneing but i suspect the TCPDF is not playing nicely.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top