public function pdfAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $this->getRequest()->setParam('paginator', false);
     $content = $this->view->action('list', 'persons', 'persons', $this->_getAllParams());
     $pdf = new Agana_Print_Pdf_Report('CADASTRO DE PESSOAS', 'MELHOR VIVER', 'ONG ONLINE', $this->view->theme_path);
     $pdf->addPage($content);
     $pdf->addPage($content);
     $pdf->download();
 }
 public function pdfProjectAction()
 {
     if ($this->_isUserAllowed(null, NULL)) {
         $this->_helper->layout->disableLayout();
         $this->_helper->viewRenderer->setNoRender(true);
         $pd = new Project_Domain_Project();
         $project = $pd->getById($this->_getParam('id'));
         $this->view->project = $project;
         $content = $this->view->render('admin/pdf-project-cover.phtml');
         $pdf = new Agana_Print_Pdf_Report(Zend_Registry::get('Zend_Translate')->_('Project') . ' :: ' . $project->name, 'MELHOR VIVER', 'ONG ONLINE', $this->view->theme_path);
         $pdf->addPage($content);
         $fulldescription = $this->view->render('admin/pdf-project-fulldescription.phtml');
         $pdf->addPage($fulldescription);
         $pdf->download('project-' . $project->getName() . '.pdf');
     }
 }
 public function pdfFullRecordAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     //$content = $this->view->action('get', 'person', 'persons', $this->_getAllParams());
     $personDomain = new Persons_Domain_Person();
     $person = $personDomain->getById($this->_getParam('id'));
     $appAccount = $person->getAppaccount();
     $pdf = new Agana_Print_Pdf_Report('FICHA PESSOAL', $appAccount->getName(), 'ONG ONLINE', $this->view->theme_path);
     $content = '';
     $allModules = Zend_Registry::getInstance()->get('Person-Dependency-Domain');
     foreach ($allModules as $module) {
         /**
          * get class and method to call to verifie person record reference
          */
         $domain = new $module['domain']['class']();
         $method = isset($module['domain']['method']) ? $module['domain']['method'] : 'getById';
         /**
          * if there is at least a record  for this module
          * builds the get navigation menu entry
          */
         $params = $this->_getAllParams();
         $params['person'] = $this->_getParam('id');
         $hasReference = $domain->{$method}($this->_getParam('id'));
         if ($hasReference) {
             if (isset($module['pdf']['action'])) {
                 $content .= $this->view->action($module['pdf']['action'], $module['pdf']['controller'], $module['pdf']['module'], $params);
             }
         }
     }
     $pdf->addPage($content);
     $pdf->download();
 }