[SOLVED] Problem with R&OS;PDF creator: Lost headers |
[eluser]sl3dg3hamm3r[/eluser]
Hey there I use R&OS; and I am stumbling over a problem. Unfortunately, I couldn't find any contact-address on the web-page, therefore I hope somebody here solved it already. I set the headers as follow: Code: $this->CI->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // some day in the past to avoid cached files Basically, it will prevent caching, the browser would pop up a nice save or open dialog, and the pdf gets a nice name. This works, until the pdf-class needs to generate another page due to long (dynamic) contents. Then it seems that I loose the headers, the pdf opens within the browser, no nice name when I want to save it. I looked for any echo-statements in the pdf-class, nothing. Has anybody encountered this before? Thx for any tipps, if any... Oliver
[eluser]sl3dg3hamm3r[/eluser]
I posted the same post now on sourceforge, since there is a forum about this class. but not much going on there...
[eluser]sl3dg3hamm3r[/eluser]
okay, after playing around I figured out that it was a classical output before header, because I was simply echoing the pdf-stream in my library. d'oh! That's how it should be used correctly: Code: $this->CI->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // some day in the past to avoid cached files It is then in the hands of CI to set the headers and send the content after! By the way: If you don't want to set your headers yourself, you can use Code: $this->CI->cezpdf->ezStream(); |
Welcome Guest, Not a member yet? Register Sign In |