Hi, everyone. I've a question about dompdf. Maybe one of you ever have
the same problem like me and would like to share the solution.

I want to generate a PDF file but unfortunately, it seems didn't work
at all in my cake project. I've searched the internet and found this
link: 
http://blog.futurate.com/2008/02/getting-dompdf-working-inside-cakephp.html
and I still not getting it along.

I've extracted the dompdf library to app/vendors and make a function
in controller, so it looks like this:

function test()
    {
        $htm = "<html>";
        $htm .= "<head><title>Test</title></head>";
        $htm .= "<body><h1>Sample</h1></body>";
        $htm .= "</html>";
        $dompdf = new DOMPDF();
        $dompdf->load_html( $htm );
        $dompdf->render();
        $dompdf->stream( "sample.pdf" );
        print_r( $dompdf );
    }

Anyone can help me? Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to