Re: Writing extremely large RTF or .doc files
Re: Writing extremely large RTF or .doc files
- Subject: Re: Writing extremely large RTF or .doc files
- From: Douglas Davidson <email@hidden>
- Date: Sat, 18 Jun 2011 08:06:06 -0700
I might point out that NSAttributedString has a facility for writing out HTML that has options flexible enough to do things like suppressing the head etc for writing out HTML fragments.
As others point out, HTML is better suited to this sort of thing than many other formats. NSAttributedString can also read it back in later, or if needed /usr/bin/textutil can convert to other formats.
Douglas Davidson
On Jun 17, 2011, at 10:49 PM, Dave DeLong <email@hidden> wrote:
> Fair enough. This is certainly a great alternative to stripping out the document level attributes, but I'd still prefer the format to be as "native" as possible. Using HTML like this feels a bit kludgey.
>
> Dave
>
> Sent from my iPhone
>
> On Jun 17, 2011, at 10:45 PM, Ken Tozier <email@hidden> wrote:
>
>>
>> On Jun 18, 2011, at 1:18 AM, Dave DeLong wrote:
>>
>>> It needs to be editable after the fact.
>>>
>>> Dave
>>> ____
>>
>> It is. If you open such a file in Word, it just looks like styled text. You can edit it and save it as html or RTF. Whichever you prefer. Try saving the following to a plain text file, open it in Word, and voila! Editable, styled text file.
>>
>> <html>
>> <head>
>> <title>
>> Word edit test
>> </title>
>> <style type="text/css">
>> .chunkHeader
>> {
>> font-family: Lucida Grande, Gill Sans, Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
>> font-size: 14px;
>> font-weight: bold;
>> }
>>
>> .chunkBody
>> {
>> font-family: Lucida Grande, Gill Sans, Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
>> font-size: 12px;
>> font-weight: normal;
>> }
>> </style>
>> </head>
>> <body>
>> <p class='chunkHeader'>Header 1</p>
>> <p class='chunkBody'>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
>> <p class='chunkHeader'>Header 2</p>
>> <p class='chunkBody'>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.</p>
>> </body>
>> </html>
>>
>>
>>
>> _______________________________________________
>>
>> 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
> _______________________________________________
>
> 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
_______________________________________________
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