Welcome Guest, Not a member yet? Register   Sign In
CI instance object and use of an external library (generation of a pdf)
#1

[eluser]bastien31[/eluser]
Hi,

I will try to be as clear as possible to explain my problem. If not, tell me !

In my app, I did a controller in order to show images uploaded by the users. By this way, the images can only be seen by members and are not public like in facebook for example (image addresses are just hashed but are public).

I also use the mpdf library to generate a pdf from the content of web page. To use it, I have in the third party directory the mpdf library. To be able to use it with my formatting, I put in the libraryn my mpdf library. So the process is : in the pdf controller, I call a function of my mpdf library which create a mpdf object and generate the pdf (using the mpdf in the third party dir.).

So, it works great. But the problem is as following : if I have an image in my page, it's like that :

<img src="http://localhost/www/myapp/library/image/hashed_name_of_the_image" alt="" />

In the image function of the library controller, if i have no restriction, it works and images is shown in the pdf.

But for example, if I put: if($this->session->userdata('logged') == true)

it doesn't !

I understand that the mpdf object which demand the access to the library image function has not a valid session to do it. So I try to use config parameter or to put another type of parameteres but nothing works.

Is there a way to do what I want to do ??? Smile

thanks
Bastien


Messages In This Thread
CI instance object and use of an external library (generation of a pdf) - by El Forum - 08-14-2012, 04:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB