I have a website that is generating a PDF file based from data.
I tried it in a free webhost and it is ok but when i upload it to my server i get this error:
TCPDF ERROR: Can't open image file: /var/www/html/tcpdf/cache/mska_1d34cb1ba2c1951624fbccb7556c6d1d
in the cache folder the mska_1d34cb1ba2c1951624fbccb7556c6d1d doesnt exist in the folder.
I got the answer now.
For all who will be able to encounter this problem these are the possible solution.
One cause is that folders inside tcpdf has no permissions of write and read. make sure the folder for cache and images has 644 or 755 (recommended) permission. these permission is very important because there is a process when generating pdf it write something is the cache or read into images.
another cause is that tcpdf does not accept png file or with transparent images. my solution was to make the image into a jpeg and apply a white background for it. so avoid png with transparent.
hope it helped.