Forums

TCPDF Output Error

BBplayer 20 Dec, 2016
Hello,

I've just downloaded Chronoforms 5 for Wordpress and installed TCPDF action. Otherwise when I press my submit button the PDF won't be generated and the page shows me an error:

Warning: Invalid argument supplied for foreach() in (path)\wp-content\plugins\chronoforms\front\chronoforms\libs\form.php on line 98
TCPDF ERROR: Some data has already been output, can't send PDF file


How to solve it?

Thanks
GreyHead 20 Dec, 2016
Hi BBplayer,

Hmm, I've never had to use the TCPDF action on WordPress. If you set the action to save to the server instead of immediate download does it then work?

Bob
BBplayer 21 Dec, 2016
No, it doesn't work
GreyHead 21 Dec, 2016
Hi BBplayer,

Bother . . . I'll see if I can get it to work on my WP test site.

Bob
GreyHead 22 Dec, 2016
Hi BBPlayer,

After some digging I think I have solved this - it's a CF bug :-( A few months ago Max changed the 'action' identifier code from {N} - which caused an odd JavaScript warning - to _XNX_ He changed all the actions to use this BUT it looks as though he didn't update the WP version of ChronoForms to match.

The right answer is for Max to do the update. Meanwhile as a workaround you can edit the file /wp-content/plugins/chronoforms/admin/chronoforms/actions/tcpdf/tcpdf.php and do a global search and replace switching _XNX_ back to {N} (If you like I can email you a copy of the file that I have edited).

Bob
This topic is locked and no more replies can be posted.