OK I tried this as well. and the same error there.
I check all my controllers, views, lalyouts etc. and there are no exra space character which may generate this error.
Error log when open PDF in notepad++
An Error occurred while handling another error:
yii\web\HeadersAlreadySentException: Headers already sent in D:\wamp\www\humhub\sw7_new\protected\modules\sw7reports\vendor\koolreport\export\File.php on line 67. in D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\web\Response.php:373
Stack trace:
#0 D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\web\Response.php(346): yii\web\Response->sendHeaders()
#1 D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\web\ErrorHandler.php(136): yii\web\Response->send()
#2 D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\base\ErrorHandler.php(135): yii\web\ErrorHandler->ren
And here is the error log
yii\base\InvalidArgumentException: Response content must be a string or an object implementing __toString(). in D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\web\Response.php:1117
Stack trace:
#0 D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\web\Response.php(344): yii\web\Response->prepare()
#1 D:\wamp\www\humhub\sw7_new\protected\vendor\yiisoft\yii2\base\Application.php(398): yii\web\Response->send()
#2 D:\wamp\www\humhub\sw7_new\index.php(29): yii\base\Application->run()
#3 {main}