Welcome Guest, Not a member yet? Register   Sign In
CI4 Dynamic DOMPDF view ,
#11

I don't know how to upload to this forum.
There is no upload form.
Reply
#12

I've given it a try and my code (so this one from the post here) works fine if env is set to production. In development it indeed throws an error and write the content into the pdf instead of a valid file.
Reply
#13

What is the exact error message?
Reply
#14

in development mode it generates a blank pdf (as it seems) and downloads it, but it's no valid pdf. If one opens it with a text editor instead it contains the CI error page

As it is too much code for the forum, it is listed here: https://pastebin.com/dtWYdb5s

In production mode the pdf file is valid and contains the correct data.
Reply
#15

The error message is:
Quote:ErrorException
ini_set(): Session ini settings cannot be changed after headers have already been sent

and it was caused by Debug Toolbar.

But I don't know why the error occurs.
The controller has not yet executed.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB