/** * Render a pdf * * @param string $path Path to the documentation * @param string $name Name of the documentation * @param string $url * @param array $urlParams */ protected function renderPdf($path, $name, $url, array $urlParams = array()) { $parser = new DocParser($path); $toc = new DocTocRenderer($parser->getDocTree()->getIterator()); $this->view->toc = $toc->setUrl($url)->setUrlParams($urlParams); $section = new DocSectionRenderer($parser->getDocTree()); $this->view->section = $section->setUrl($url)->setUrlParams($urlParams); $this->view->title = sprintf($this->translate('%s Documentation'), $name); $this->_request->setParam('format', 'pdf'); $this->_helper->viewRenderer->setRender('pdf', null, true); }