TCpdf work localy but don'work after deplyment on the server

Hi, In a blank application with tcpdf, I have defined some thing to print and save it in pdf file.
This work perfectly in local but when I deploy it on my server , it send many error message and i can not save the pdf file on my server.

How can I can solve it?
Thanks for any helps.

tcpdf uses a temporary file to write to. It looks like that you haven’t set the rights correctly on your server (no R/W)