OEModule\OphCoCvi\controllers\PrintTestController::actionGetPDF PHP Method

actionGetPDF() public method

public actionGetPDF ( )
    public function actionGetPDF()
    {
        $file = '/var/www/openeyes/protected/runtime/document.pdf';
        header('Content-type: application/pdf');
        header('Content-Disposition: inline; filename="document.pdf"');
        header('Content-Transfer-Encoding: binary');
        header('Content-Length: ' . filesize($file));
        @readfile($file);
    }