Saving AttributedString with Attachments to RTFD
Saving AttributedString with Attachments to RTFD
- Subject: Saving AttributedString with Attachments to RTFD
- From: email@hidden
- Date: Sun, 6 Apr 2008 16:39:34 +0100
Dear All
I am trying to save an AttributedString with attachments to a RTFD file.
I am converting the Attributed string to NSData using:
NSData *textData = [ exportText
RTFDFromRange:textRange documentAttributes:nil ];
and then saving it to fileName:
[ textData writeToFile:fileName atomically:NO ];
The file that is generated appears to be the data structure of the
RTFD file rather than a simple RTFD file that can be opened by textEdit.
Can anybody suggest what else I need to do or what I am doing wrong.
Thanks
Fred
PS. I can get what I want by creating a NSTextView form the
attributedString and then saving it to file using the NSText method:
[ textView writeRTFDToFile:fileName atomically:NO ];
but I feel this should not be necessary.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden