TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Problem with Output or Saving pdf with method F

Open eliyaamos opened this issue 1 year ago • 1 comments

Screenshot from 2024-10-09 10-15-42 Screenshot from 2024-10-09 10-16-05 I am getting problem with with saving pdf file to my path but when I display the file in browser with 'I' method it works fine while with F it returns "TCPDF ERROR: Unable to create output file:" and error is

Message: fopen(): Remote host file access not supported, file://uploads/atachments/forms/Loan_Form16.pdf Filename: include/tcpdf_static.php

eliyaamos avatar Oct 09 '24 07:10 eliyaamos

Hi @eliyaamos,

The message you're getting says just about everything, and so maybe you've already hunted down the root of this user error.

fopen(): Remote host file access not supported, file://uploads/atachments/forms/Loan_Form16.pdf

Presumably, your $filename in fopenLocal() is 'uploads/atachments/forms/Loan_Form16.pdf', so TCPDF adds file:// to that. Does that file exist? There appears to be a misspelling in there, also, FWIW. And furthermore, is it on the same system you're running TCPDF on? The $filename should be a local URL or an absolute pathname.

littlepackage avatar Oct 11 '24 15:10 littlepackage