需要 RTF linter

发布于 2024-11-10 02:47:03 字数 346 浏览 7 评论 0原文

有人知道 RTF 文件的 linter 吗?

我正在为文字处理器编写一个简单的 RTF 导出工具。我已经到了这样的阶段:我生成的文件现在加载到 OpenOffice 中并且似乎可以工作 --- 但我刚刚发现,如果我从 OpenOffice 中编辑它,保存它,然后将其加载回 OpenOffice 中,它会神秘地出现变化。我的假设是,我的样式表和列表的布局不正确,并且在 OpenOffice 中产生了奇怪的变形数据结构。

我真的很想要一个工具,可以查看我的 RTF 文件,将其与规范进行匹配,并告诉我我做错了什么...

我使用的是 Linux 环境,但这是一个跨平台应用程序,所以我如果有人有 Windows 工具,我也愿意使用。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一向肩并 2024-11-17 02:47:03

@David,你说得对,大多数搜索链接都很糟糕。经过一番查找,我发现了 RTF Pocket Guide 的作者的一个页面,名为 关于 RTF。请参阅有用的 RTF 链接部分。

警告:我对这些工具没有任何经验。

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

半岛未凉 2024-11-17 02:47:03

(我知道这已经过时了,但对于后人来说......)

我对 OpenOffice 的体验主要与本机文件格式有关,但迄今为止我对 RTF 的简短体验是相同的。

OpenOffice 会生成具有大量默认样式和格式的“臃肿”文件。我的工具生成“无瑕疵”文件,其中包含指定文档的最少信息。当我在 OpenOffice 中打开一个文件然后再次保存时,它会添加我认为不必要的信息。

该文档对用户来说似乎没有变化,但底层文件要长得多。

如果没有看到您的文档或没有更多详细信息,您的文档可能完全有效,但只是没有 OpenOffice 想要的额外内容。您可能不需要更改任何内容,除非您在使用文档时遇到问题。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文