Re: Writing extremely large RTF or .doc files

2011-06-19 Thread Mike Abdullah
BTW we have code for streamed generation of HTML files here: https://github.com/karelia/KSHTMLWriter On 19 Jun 2011, at 19:03, Dave DeLong wrote: > Thanks for the suggestions, everyone. I ended up generating HTML files, and > they seem to be working fine. > > Cheers, > > Dave > > On Jun 18,

Re: Writing extremely large RTF or .doc files

2011-06-19 Thread Dave DeLong
Thanks for the suggestions, everyone. I ended up generating HTML files, and they seem to be working fine. Cheers, Dave On Jun 18, 2011, at 8:06 AM, Douglas Davidson wrote: > I might point out that NSAttributedString has a facility for writing out HTML > that has options flexible enough to do

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Charles Srstka
On Jun 17, 2011, at 11:43 PM, Dave DeLong wrote: > Hey List, > > I'm writing a little app for myself to take a database full of text and > format it into either a Word Document or an RTF document (either one is fine > for my purposes). I've got it working for small datasets, but I'm running in

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Douglas Davidson
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

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Peter Hudson
I'm not sure quite how big you data is - but I write big data sets to file by writing all the data into an NSTextView - and then get the RTF data from the view. There is also quite a lot of scope for combining separate RTF files. You can see how to do this by renaming your RTF file with a

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Ken Tozier
On Jun 18, 2011, at 3:15 AM, Joar Wingfors wrote: > That loops back to the original question though, does it not? Ie., if this > document is really large, how would he do this HTML+CSS -> RTF conversion? > > HTML documents are directly openable in Word. No conversion necessary. Write all the

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Jean-Christophe Helary
On Jun 18, 2011, at 4:15 PM, Joar Wingfors wrote: >> I surely can't be the first person to want to do this, so I ask: what have >> I missed? How can I generate extremely large rich-text files without having >> to build the entire file in memory before writing it out? > > > Perhaps your requ

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Joar Wingfors
On 17 jun 2011, at 23.08, Ken Tozier wrote: > There's nothing particularly kludgy about using HTML to create styled text > documents. The entire internet is based on it. Kind of depends on where this document would be used though. On the Internet? Amazing. On the desktop? Weird! > Once the

Re: Writing extremely large RTF or .doc files

2011-06-17 Thread Dave DeLong
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 wrote: > > On Jun 18

Re: Writing extremely large RTF or .doc files

2011-06-17 Thread Ken Tozier
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, op

Re: Writing extremely large RTF or .doc files

2011-06-17 Thread Dave DeLong
On Jun 17, 2011, at 10:15 PM, Ken Tozier wrote: > Is there some reason the text needs to be RTF? Is it just that you want to > view this text formatted nicely at a future date? Or do you plan on > distributing the monster RTF? It needs to be editable after the fact. Dave _

Re: Writing extremely large RTF or .doc files

2011-06-17 Thread Ken Tozier
Is there some reason the text needs to be RTF? Is it just that you want to view this text formatted nicely at a future date? Or do you plan on distributing the monster RTF? If it's just nicely formatted text you're after would HTML with CSS serve just as well? If so, you could write an aggregat

Writing extremely large RTF or .doc files

2011-06-17 Thread Dave DeLong
Hey List, I'm writing a little app for myself to take a database full of text and format it into either a Word Document or an RTF document (either one is fine for my purposes). I've got it working for small datasets, but I'm running in to performance issues when trying to generate files larger