Schnelle Lösung um verschieden Content-types mit Zend zu versendenQuick solution to send custom content types in Zend Framework

In your controller action simply use:

// disable default layout rendering
// e.g. for PDF
             ->setHeader('Content-Disposition', 'inline; filename=result.pdf')
             ->setHeader('Content-type', 'application/pdf');
// finally send content based on custom content-type

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.