I am initialising an NSAttributedString with RTF and it works, in that I can see the text and attributes like font, size and weight are preserved.
NSMutableAttributedString* attributedRTFString = [NSMutableAttributedString.alloc initWithRTF:rtfContent documentAttributes:nil];
Some attributes, notably colour, are lost though. If I look at the RTF code I can see that those attributes are there (for example)…
{\*\htmltag72 </p>}
{\*\htmltag64 <p class=MsoNormal>}\htmlrtf {\htmlrtf0
{\*\htmltag84 <b>}\htmlrtf {\b \htmlrtf0
{\*\htmltag148 <span style='font-size:10.0pt;color:#5F5F5F'>}\htmlrtf {\htmlrtf0
{\*\htmltag156 </span>}\htmlrtf }\htmlrtf0
{\*\htmltag92 </b>}\htmlrtf }\htmlrtf0
{\*\htmltag148 <span style='color:#1F497D'>}\htmlrtf {\htmlrtf0
{\*\htmltag244 <o:p>}
{\*\htmltag252 </o:p>}
{\*\htmltag156 </span>}\htmlrtf }\htmlrtf0 \htmlrtf\par}\htmlrtf0
\htmlrtf \par
\htmlrtf0
And I can see the colours in the original document.
How should I be opening RTF to preserve the formatting fully?
NSAttributedStringwith some colors, and then convert it into RTF "Content", what are the colors tags? Also, that seems to be "htmlrt", not only "rtf", so that could be the reason on why there are differences?