Hacker News new | past | comments | ask | show | jobs | submit login

I don't have an opinion on how good a format RTF is, but I kind of like it.

As part of a Java project (a while ago), I studied the RTF format, partly by reading the spec, and partly through reverse engineering - by creating multiple incrementally larger RTF docs, starting from zero content, then adding a word, then a font style, then a paragraph, a table, etc. And after each addition, opened the RTF in a hex editor and viewed the content, to help decipher the format rules. Then wrote a small RTF generation library in Java, that we used in the project to programmatically generate reports from DB data fetched via EJB. I also provided some ability to vary content and style independently. Good fun.




Just out of curiosity, why the hex editor? Isn’t RTF just ASCII?


You are right, it is just ASCII text. Probably a brain fart there, sorry. I may have said that (hex editor) out of sheer habit of using one to inspect various formats. Or I may have used a text editor, if so TextPad, IIRC, since the project was on Windows (at least dev env was). It was years ago, so not sure.


Aight :)


In what ways is it preferable to ODT (OpenDocument format)?


sidpatil answered (sibling comment). The RTF spec was freely available (on MS's site and/or MSDN CDs then) and should still be around, at least on some sites, since RTF is still used a lot as an exchange format between word processors and even other software. So you can read the spec; it is straightforward.

RTF is to Word like CSV is to Excel. In fact, we generated RTF because the output was to be input to Adobe InDesign.


RTF is a much simpler format than ODT. RTF source code resembles TeX at first glance; ODT is based on XML.

Unfortunately, it's not an open standard AFAICT.


It's not a standard in the sense of an ISO-style organization approval, but RTF has been thorougly documented by Microsoft for a very long time. [0]

[0] https://interoperability.blob.core.windows.net/files/Archive...


Right, I think it still may be a de facto standard from MS. It was so then.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: