I am writing a converter for an old db app which contains a large amount of user entered RTF text. Ideally, the RAW RTF should be converted to HTML for display in a browser.
I have tried rtfparseclass
from PHP Classes, which works ok, but seems to be thrown off but some of the embedded font definitions. For example, raw RTF like {\f1\fnil Tahoma;}
always truncates the output produced by the parser, causing detail to be lost. I don't know RTF well enough to know if that should be valid or not. The class was last updated in 2004 so I'm guessing that it may just be out of date.
Other than updating rtfparseclass
to ignore the fonts, does anyone know of a PHP library to convert RTF to HTML?