TCPDF ERROR joomla virtuemart does not create the invoice

522 Views Asked by At

I use joomla 3.9.6, virtuemart 3.4.2, and tcpdf 1.0.7 When i try to view the invoice(pdf) or when i change order status to confirmed i get the TCPDF ERROR: Unable to create output file: \vmorders\invoices\invoice_190522TIXG01.pdf

i already have created the folders vmorders\invoices and gave it the proper permissions. (the site runs locally with wamp)

Php Error log

[22-May-2019 16:11:21 UTC] PHP Warning: fopen(): remote host file access not supported, file://\vmorders\invoices\invoice_190522TIXG01.pdf in C:\wamp64\www\byzantinemusic\libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php on line 1854

2

There are 2 best solutions below

0
ttrixas On

I think i have found the solution. Edit "libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php". At line 1850 remove code

$filename = 'file://'.$filename;            

and substitute with this

$absPath = getcwd(); 
            $filename =  str_replace("\\administrator","",$absPath) .$filename;
1
K Wilson On

For Virtuemart 3.6.10:

Edit "libraries\vendor\tecnickcom\tcpdf\include\tcpdf_static.php".

At line 1817 remove code:

$filename = 'file://'.$filename;

and replace with:

    $filename = $filename;
    $absPath = getcwd(); 
    $filename =  str_replace("\\administrator","",$absPath)."/".$filename;