我试图从Excel生成PDF,但我收到以下错误:
TCPDF ERROR: [Image] Unable to get image:./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg看看Excel,我可以找到/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg ,但没有. 在它之前。 点可以成为转换失败的原因吗?
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.jpgLooking 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'。' 在此之前意味着它将在当前目录中查找名为var的文件夹。
你需要删除它。 为了从根开始。 哪个是对的。
它应该是这样的'/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg'
看起来您正在尝试使用cURL来获取图像,因此我建议您尝试将图像更改为URL,例如http://URL of project folder/../0401b0ca555959f391752bb1b0ea9ba1.jpg
除了这个建议之外很难知道发生了什么,但我怀疑TCPDF并没有很好地发挥作用。
./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpgThe '.' 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.
更多推荐
发布评论