RTF 文件中关键字的截断

发布于 2024-10-08 06:54:35 字数 425 浏览 0 评论 0原文

我们将数据嵌入 RTF 文件的 \keywords 字段中。 \keywords 标记在文件中通过“字符串替换”进行更新,而不是使用任何类型的 RTF API。

当我们在Word 2007中打开RTF文件时,该文件的keywords属性似乎只显示\keywords标签的前520个字符。如果我直接从 Word 2007 编辑此字段(超过 520 个字符),则在将文件保存到磁盘之前似乎没问题。

您觉得这是预期的行为吗?能够在 Word 中键入任意长度的关键字,但在保存/关闭/重新打开文件后丢失它们?

可能 RTF 规范明确指出该字段不能存储更多 520 字节(不是 512)...但我没有找到任何相关信息。

预先感谢您的任何帮助。

顺便问一下,您知道一些嵌入数据的备份字段吗?

we are embedding data in the \keywords field of a RTF file. The \keywords tag is updated in the file with sort of "String replacement", not by using any kind of RTF API.

It appears that when we open the RTF file in Word 2007, the keywords property of the file only display the first 520 characters of the \keywords tag. If I edit this field directly from Word 2007, with more than 520 characters, it seems ok until I save the file to the disk.

Does it feel to you as the expected behavior? Be able to type keywords of any length in Word but loosing them after having saved/closed/reopened the file?

May be the RTF specification states explicitly that the field can't store more 520 bytes (not 512)... but I don't find anything about it.

Thanks in advance for any help.

And by the way, do you know some backup field to embed data?

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

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

发布评论

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

评论(1

故笙诉离歌 2024-10-15 06:54:35

我最终使用了 \keywords 和 \description 标签。

I ended up by using both \keywords and \description tags.

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