以 RTF 格式布置图形
我感兴趣的是如何在 RTF 文档中构建某些类型的布局,理想情况下使用不仅依赖于最新 RTF 标准的技术,而且是“本机”的,即它们不涉及嵌入其他表示形式,例如图片文件。特别是:
- 在 Postscript 和 DVI 中,我可以随时指定打印下一个文本的坐标:这可以用 RTF 来完成吗?
- RTF可以通过重划来组成字符吗?
- 是否可以绘制线条、轮廓框和填充框,并绝对或相对于文本指定其几何形状?
I'm interested how to construct certain kinds of layout in RTF documents, ideally using techniques that do not depend only on the most recent RTF standards, and that are "native", i.e., they do not involve embedding other representations, like picture files. In particular:
- In Postscript and DVI, I can specify a coordinate at any time that the next text will be printed at: can this be done with RTF?
- Can RTF compose characters through overstriking?
- Can lines, outline boxes and filled boxes be drawn, with their geometry specified either absolutely, or relative to text?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在之后使用
\pvpg \phpg \posx123 \posy123
构造您可以使用
\pard
开始一个段落,以将其相对于页面的左上角定位。 参阅:http://biblioscape.com/rtf15_spec.htm#Heading39是的,但是它相当复杂,我认为它只是在 RTF 1.5 中引入的。请参阅规范的绘图对象部分。这是绘制盒子的基本示例(我不确定它是否完全有效,但它应该让您了解如何使用绘图对象):
<代码>{\rtf1\ansi\deff0
{\pard {\*\do
\dobxcolumn \dobypara
\dpect \dpx0 \dpy0 \dpxsize1000 \dpysize1000 \dplinew25
}\par}
}
如果您正在使用 RTF 进行任何工作,那么 O'Reilly 的 RTF Pocket Guide< /a>.
You can use the
\pvpg \phpg \posx123 \posy123
construct afteryou start a paragraph with
\pard
to position it relative to the top left of the page. See: http://biblioscape.com/rtf15_spec.htm#Heading39Yes, but it's rather involved, and I think it was only introduced in RTF 1.5. See the drawing objects section of the spec. Here is a basic example of drawing a box (I'm not sure it's entirely valid but it should give you an idea of how to work with drawing objects):
{\rtf1\ansi\deff0
{\pard {\*\do
\dobxcolumn \dobypara
\dprect \dpx0 \dpy0 \dpxsize1000 \dpysize1000 \dplinew25
}\par}
}
If you're doing any work with RTF it's worth picking up O'Reilly's RTF Pocket Guide.