dominiklambrechts (1) [Avatar] Offline
#1
after

header('Content-Type: application/pdf; charset=UTF-8');
echo $report->getDocument()->render();
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout->disableLayout();


the content of the document is rendered:
'%PDF-1.4 %���� 1 0 obj <> endobj 2 0 obj....'

Also the content of the header and advert are added:
'Home Browse Places ....'

I tried the following:
1. I placed an exit(); now only the content rendered.
2. I changed the statements:
$response = $this->getResponse();
$response->setHeader('Content-Type', 'application/pdf', true)
->setHeader('Content-Disposition', 'attachment;filename=testpdf.pdf', true)
->appendBody($report->getDocument()->render());

result: nothing is changed

-------------------------------------------------------------------------------------------------------------------
remark:
in my opinion it isn't a good idea to register the menu and the advert in the actionstack
bootstrap.php:
$frontController->registerPlugin(new Scribble_Controller_Plugin_ActionSetup());.
Every time that the menuAction and advertAction are used there is an access control and that is an overhead to do nothing.