Is it possible to read an RTF file and rewrite it in TXT format, using PHP?
I did some tests using
file_get_contents() , but the results were not as expected.
It would be easier if you used libraries for this purpose.
According to the example on Github, you can do:
$doc = new \Jstewmc\Rtf\Document(); $doc->load('/path/to/file.rtf'); $doc->write('text');