I'm using DOMPDF to create PDF files from the html that Zend Framework
outputs. Here's my code:

public function downloadAction() {
        $this->_helper->layout->setLayout('prints');
        require_once("dompdf-0.5.1/dompdf_config.inc.php");
        spl_autoload_register('DOMPDF_autoload');
                
        $dompdf = new DOMPDF();
        $dompdf->set_paper("a4","landscape");
        
$dompdf->load_html_file("http://localhost/test/httpdocs/inspecties/html";);
        $dompdf->render();
        $dompdf->stream("sample.pdf");
}

I have two problems:
1. I seem to have to pass an absolute url to DomPDF's load_html_file()
function. Is there a way to pass a relative url so I can make my application
more portable?
2. I use Zend_Acl for access control. I have to make the requested html file
publicly accessible for dompdf to be able to read the file contents. I'm not
sure if this setup is recommended and secure as it means everyone pointing
the browser to that url will be able to view html output that might not be
inteded for their eyes.
-- 
View this message in context: 
http://www.nabble.com/Rendering-pdf%27s-with-DomPDF-and-ZF-tp21374780p21374780.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to