Forums

TCPDF ERROR: Unable to create output file

oandm765 07 Jun, 2024

Hello,

I am trying to activate TCPDF on the site and when I set it to store the file I get this error:

TCPDF ERROR: Unable to create output file: /public_html/website_b83a724c/components/com_chronoforms8/files/file.pdf

BUT, when I set it to display inline or Download, it does output the PDF, with the set file name and everything.

I checked my folder permissions and it was set to 755. I changed it to 777 just to make sure.. Still nothing. 

Tried many different paths, Set it in plain text, tried using both {path:root}, and {path:front} nothing seems to work. 

Running on PHP 8.3. Joomla 5. 

I had a similar issue with uploads at first but simply removing the upload directory fixed it and the files are actually being uploaded to the server. (although I have no control on where they are saved - Forced to use the default com_chronoforms8/uploads folder)

Ideally I need this to work so that I can later attach the file made to the email confirmation that is sent. If there is a way to attach to PDF without storing the file on the server I'd be open to it.

Any help or guidance would be very much appreciated.

Thanks!

Max_admin 14 Jun, 2024

what is your current file path in the TCPDF action ?

Do you mean that you set the "files" folder permissions to 777 ?

Did you install Chronoforms using the Joomla extensions installer ? did you change any permissions after that ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
oandm765 15 Jun, 2024
Answer
1 Likes

Hi Max,

I was able to get around this by typing out the entire save location instead of using the {path:front} shortcode.

I had to put this into the field:

/home1/ttmrklmy/public_html/website_b83a724c/components/com_chronoforms8/files/{data:UUID}_onlineCR{data:vid}_{user:id}{data:ruid}.pdf

Might need to be something that is looked at as the error reads "/public_html/website_b83a724c/components/com_chronoforms8/files/file.pdf" It is missing the beginning part of the path to my site folder "/home1/ttmrklmy/"

For now, this workaround worked to get me by.

Thanks for the help!

Max_admin 16 Jun, 2024

that's good to know, the error is coming from the TCPDF library so I can not change that, but did you try to use {path:front} ? that would give you:

/home1/ttmrklmy/public_html/website_b83a724c/components/com_chronoforms8/

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.