Hello, 
another pdf question.
After I've created the pdf, how to output it for download?
This is the code I actually use and it doesn't work ( pdf is corrupted )

      $pdfString  = $pdf->render();
      $response = $this->getResponse();
      $response->setHeader('Cache-Control', 'public', true)
                ->setHeader('Content-Description', 'File Transfer', true)
                ->setHeader('Content-Disposition', 'attachment; 
filename=volantino.pdf', true)
                ->setHeader('Content-Type', 'application/pdf', true)
                ->setHeader('Content-Transfer-Encoding', 'binary', true)
                ->appendBody($pdfString);
      $this->_helper->layout->disableLayout(); 
      $this->_helper->viewRenderer->setNoRender(true);

What is the mistake?
Thanks




                                          
_________________________________________________________________
Le tue Emoticon ti sembrano poche? Scaricane di nuove!
http://intrattenimento.it.msn.com/emoticon/

Reply via email to