I 'm using mPDF 7.1 (via composer) and i have a problem with "Temporary files directory".
Can anyone tell me why this is always saying that the directory is not writable, when it absolutely is?
I am on my server and i have tested it with all folders. Same error message.
This is a sample of my code:
<?php
require_once($_SERVER["DOCUMENT_ROOT"] . "/library/tools/mpdf7/vendor/autoload.php"); // include MPDF library
function generateInvoice()
{
try
{
$mpdf = new \Mpdf\Mpdf([
"tempDir" => __DIR__ . "/custom/temp/dir/path"
]);
$mpdf->WriteHTML("<h1>Hello World!</h1>");
$mpdf->Output();
return true;
}
catch(\Mpdf\MpdfException $e)
{
echo $e->getMessage();
return false;
}
}