开发者

RTF linter wanted

开发者 https://www.devze.com 2023-03-09 07:10 出处:网络
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

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.


@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.


(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.

0

精彩评论

暂无评论...
验证码 换一张
取 消