First of all check if you have CURL enabled and then make sure php can write into your tcpdf directory, most probably it is permission problem. Here is the link:
This is another answer dealing with file size restriction:
I am not sure which user PHP uses. I can see some of them write only, so I suspect they might need read as well. Try to give full access to all users and then revert one at a time.
Thanks. I have tried that. Still same error. The rest of the php file functions as normal if I remove the code that deals with the image.
The error screen shows the path ends with "/", shoudn't this be backslash, same as other separator?
Try to set K_PATH_CASH to TCPDF directory
C an you check if an image is actually created in cache?
Ok I have made some progress but still an error. I have found that the tcpdf_config_alt.php file is looking at a default folder for the images as seen in snippet below. But the images are in Filemaker so not sure what needs changing here.
Default images directory.
By default it is automatically set but you can also set it as a fixed string to improve performances.
//define ('K_PATH_IMAGES', dirname(__FILE__).'/../images/');
define ('K_PATH_IMAGES', 'C:/Program Files/FileMaker/FileMaker Server/HTTPServer/conf/tcpdf/');
Cache directory for temporary files (full path).
//define ('K_PATH_CACHE', sys_get_temp_dir().'/');
define ('K_PATH_CACHE', 'C:/Program Files/FileMaker/FileMaker Server/HTTPServer/conf/tcpdf/');
New error now looks like this.
image001.jpg 59.3 K
I suppose tcpdf needs to cache images onto the local drive before it can embed them into pdf. You seems to be on the right track.
The error looks like filename is missing. (image filename is exactly the defined path, ends with /)
In first post your code make html for image, so work for writeHTML(), but seems not making image object for tcpdf in example
which is not need when use writeHTML().
Thanks for all your input.
I have found a work around. Instead of trying to embed the image i want to use directly from my Filemaker database i have copied the image from the external storage server directory and placed it in the images folder that tcPDF is looking at using the php copy() function.
I also had to enable the
extension=php_gd2.dll in the php.ini file as tcp was not setup to handle png files.