Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RTF linter wanted

Does anyone know of a linter for RTF files?

I am writing an simple RTF export tool for a word processor. I've got to the stage where my generated files now load into OpenOffice and seem to work --- except I've just discovered that if I edit it from within OpenOffice, save it, and the load it back into OpenOffice, it mysteriously changes. My hypothesis is that my style sheet and list table aren't laid out properly and it's producing strangely deformed datastructures inside OpenOffice.

I'd really like a tool that will look at my RTF file, match it against the spec, and tell me what I'm doing wrong...

I'm on a Linux environment, but this is a cross platform app so I'm willing to use Windows tools as well if anyone has one.

like image 660
David Given Avatar asked May 29 '11 23:05

David Given


2 Answers

@David, you're quite right that most of the search links are terrible. After a bit of looking, I found a page by the author of the RTF Pocket Guide called About RTF. See the section on Useful RTF Links.

Caveat: I have no experience with any of these tools.

like image 196
TrueWill Avatar answered Nov 10 '22 06:11

TrueWill


(I know this is old but for posterity...)

My experience with OpenOffice has mostly been related to the native file format, but my short experience thus far with RTF is the same.

OpenOffice produces "bloated" files with a great number of default styles and formats. My tools produce "cruft-free" files with the minimum information to specify the document. When one of my files is opened in OpenOffice and then saved again, it adds the information that I consider unnecessary back in.

The document appears unchanged to the user, but the underlying file is much longer.

Without seeing your documents or having more details, it may be that your documents are perfectly valid but simply don't have the extra stuff that OpenOffice wants. It's probably not necessary for you to change anything, unless you're seeing problems when the documents are used.

like image 27
Fletcher T. Penney Avatar answered Nov 10 '22 08:11

Fletcher T. Penney