We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have updated the code about reader/rtf.php `<?php /**
namespace PhpOffice\PhpWord\Reader;
use Exception; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Reader\RTF\Document;
/**
Loads PhpWord from file.
@param string $docFile
@return \PhpOffice\PhpWord\PhpWord */ public function load($docFile) { $phpWord = new PhpWord();
if ($this->canRead($docFile)) {
$doc = new Document(); $b1= file_get_contents($docFile); $b1=preg_replace_callback("/(\\\\'[\w]{2}\\\\'[\w]{2})/iUs",function($e){ $t=str_replace("\'","",$e[1]); return iconv("gb2312","utf-8", pack('H*', strtoupper($t))); },$b1); $doc->rtf=$b1; $doc->read($phpWord);
} else { throw new Exception("Cannot read {$docFile}."); }
return $phpWord; } } `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have updated the code about reader/rtf.php
`<?php
/**
*/
namespace PhpOffice\PhpWord\Reader;
use Exception;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Reader\RTF\Document;
/**
/
class RTF extends AbstractReader implements ReaderInterface
{
/*
Loads PhpWord from file.
@param string $docFile
@return \PhpOffice\PhpWord\PhpWord
*/
public function load($docFile)
{
$phpWord = new PhpWord();
if ($this->canRead($docFile)) {
} else {
throw new Exception("Cannot read {$docFile}.");
}
return $phpWord;
}
}
`
The text was updated successfully, but these errors were encountered: