pratik
pratik

Reputation: 25

Tcpdf showing TCPDF ERROR: Unable to create output file

This is the first time i am looking into TCPDF. It was developed by previous developer. Now we have changed the server. And it is showing the following Error.

TCPDF ERROR: Unable to create output file: /var/www/html/tcpdf/pdf_generate/pdf_ca/ado131822-2017-11-09060853.pdf

Please Help me and Guide me with the possibility of what can cause this error. for temporarily basses i have kept the permission to 777 but even that doesn't helps

Upvotes: 0

Views: 3951

Answers (2)

Chinmay235
Chinmay235

Reputation: 3414

That's because your folder doesn't have proper permissions. Change your directory permissions. In Linux, you will do this like mentioned below.

chmod -R 0777 /var/www/html/tcpdf/pdf_generate/pdf_ca/

If the above one not working then try to use the below code before your pdf output

ob_clean();

Upvotes: 0

Divyesh Jesadiya
Divyesh Jesadiya

Reputation: 957

make sure that file ado131822-2017-11-09060853.pdf is not open anywhere when you run script. if it's open somewhere else then TCPDF can't open it.

Upvotes: 0

Related Questions