Unable to stream pdf: headers already sent