public function exportAsAttachedFile($name = "")
    {
        $this->_save();
        if (headers_sent($filename, $linenum)) {
            throw new OdfException("headers already sent ($filename at $linenum)");
        }
        
        if ($name == "") {
            $name = md5(uniqid()) . ".odt";
        }
        
        header('Content-type: application/vnd.oasis.opendocument.text');
        header('Content-Disposition: attachment; filename="'.$name.'"');
        readfile($this->tmpfile);
    }
public function exportAsAttachedFile($name = "")
    {
        $this->_save();
        if (headers_sent($filename, $linenum)) {
            throw new OdfException("headers already sent ($filename at $linenum)");
        }
        
        if ($name == "") {
            $name = md5(uniqid()) . ".odt";
        }
        
        header('Content-type: application/vnd.oasis.opendocument.text');
        header('Content-Disposition: attachment; filename="'.$name.'"');
        readfile($this->tmpfile);
    }
public function exportAsAttachedFile ( $ name = "" ) { $ this -> _save ( ) ; if ( headers_sent ( $ filename , $ linenum ) ) { throw new OdfException ( "headers already sent ($filename at $linenum)" ) ; } if ( $ name == "" ) { $ name = md5 ( uniqid ( ) ) . ".odt" ; } header ( 'Content-type: application/vnd.oasis.opendocument.text' ) ; header ( 'Content-Disposition: attachment; filename="' . $ name . '"' ) ; readfile ( $ this -> tmpfile ) ; }
Export the file as attached file by HTTP

@param string $name (optionnal)
@throws OdfException
@return void
Export the file as attached file by HTTP