Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function actionRenderBoleto()
- {
- \Yii::$app->response->format = \yii\web\Response::FORMAT_RAW;
- \Yii::$app->response->headers->add('content-type','application/pdf');
- \Yii::$app->response->data = file_get_contents('file.pdf');
- return \Yii::$app->response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement