OK, I have done some further digging. Firstly the error being reported is that it cannot write to the temporary folder. This is a bit of a red herring because the test for the condition is incorrect. The test is happening on the file_put_content and expecting a true/false response. The test however should be doing === false because the function returns the number of bytes written which in this case is zero and PHP considers to be false. You should change this if statement.
The real issue is that the previous call to $this->report->render in the saveTempContent function is returning no content. This is what is causing the test to fail as described above.
So, I need some assistance in determining why this call is returning no content.
As a side note, on some linux systems sys_get_temp_dir may not return a directory the user has authority to write into. If this happens you can insert the following statement before the call to run in your export->pdf file:
putenv('TMPDIR='.'path to your temp dir');