ios - How to save HTML text in RTF file -
Is there any way to save the HTML string in the RTF file? I have tried the code below but the RTF file is open.
[strHTML writeToFile: [DOCUMENT_PATH Stringbapansetingpathkanpani: @ "1.rtf"] atom as: Yes Encoding: NSUTF8 string encoding error: nil];
Please guide me.
You can try it
NSMutableAttributedString;
NSMutableAttributedString * textView = [[NSMutableAttributedString alloc] init]; [TextView append attribute string: [[NSAT-encrypted string allocence] Invite string: stratified]];
Save NSRTFTextDocumentType Document Type
NSMutableDictionary * dict = [NSMutableDictionary DictionaryWithObjectsAndKeys: NSRTFTextDocumentType, NSDocumentTypeDocumentAttribute, [Ansanmber Nanbrvithintegr: 1], NSCharacterEncodingDocumentAttribute, zero]; NSData * Data = [textView dataframeRemark: NSMakeRange (0, [textView length]) Next document: Dict error: zero]; [DOCUMENT_PATH stringByAppendingPathComponent: @ "1.rtf"] atom as: Yes] [data to write: end WriteTO file ;
Comments
Post a Comment