如何生成OpenOffice绘图文档? [英] How do I generate an OpenOffice Draw document?

查看:486
本文介绍了如何生成OpenOffice绘图文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在OpenOffice Draw中创建一个流程图。



由于有很多步骤要显示(并且可能会在将来更改),但我可以提取数据,我想通过以下步骤自动创建:




  • 创建一个包含指定页面设置的新ODG文档。

  • 插入具有指定属性的流程图形状。

  • 使用箭头连接这些项目。

  • 理想情况下,



我不想花几个小时阅读一些UNO的内容 - 我只想要一些代码示例, 。



如果示例代码使用OO API,或者只是在压缩模板中修改XML文件,不要打扰 - 只要它让我能够轻松地完成上述事情。



我使用 Railo (CFML ),但我也可以使用Java,或从其他可读语言转换片段。



有任何建议如何解决这个问题吗?





更新:

我开始使用XML路线 - 我保存了一个空文件,一个单一的对象,并比较两个(作为拉链)看到差异,然后重复几次,不同的变化,以帮助了解发生了什么。



我有一些非常基本的(和不完整)代码,可以创建形状和连接它们,这可以在这里看到: http://gist.github.com/634306



这非常粗糙,但我可以制定出一种方式来使用我的现在生产我需要的 - 但我仍然希望有人可以指出我一个更好的方式这样做 - 特别是因为我需要找出一些方式适当地定位的形状,这不是微不足道。 / p>

我为此第四点创建了一个不同的问题:

http://stackoverflow.com/questions/3970366/how-do-i-auto-layout-boxes-on-a-flowchart a>



更新2:

从另一个问题,我发现了
GraphViz ,它可以可视化数据图形 - 我已经从我的数据创建了一个digraph,所以我需要的是一种方式来转换< a href =http://www.graphviz.org/doc/info/output.html =nofollow> GraphViz 的输出转换为OpenOffice Draw可以接受的内容。显而易见的想法是SVG,但似乎 OpenOffice尚未正确实现SVG ,因此我需要提出另一个计划。

解决方案

您可以尝试 api.openoffice.org 。让我知道你是如何解决的。


I want to create a flowchart in OpenOffice Draw.

Since there's a lot of steps to show (and may change in future) but I can extract the data, I want to automate the creation with the following steps:

  • Create a new ODG document with specified page settings.
  • Insert flow chart shapes with specified properties.
  • Connect those things with arrows.
  • Ideally, auto-organise things into sensible positions.

I don't want to spend hours reading about some "UNO" thing - I just want code examples that I can adapt as required.

Not bothered if the example code uses the OO API, or just modify XML files inside a zipped template - so long as it lets me do the above things easily enough.

I'm doing this with Railo (CFML), but I can also work with Java, or convert snippets from other readable languages.

Any suggestions how to go about this?


Update:
I've started playing with the XML route - I saved an empty file, and a file with a single object, and compared the two (treating as zips) to see the difference, then repeated a few times with different changes to help understand what's going on.

I have some very basic (and incomplete) code which can create shapes and connect them, which can be seen here: http://gist.github.com/634306

It's very crude, but I can probably work out a way to use what I've got now to produce what I need - but I'm still hoping that someone can point me towards a better way of doing this - particularly since I'll need to figure out some way of positioning the shapes appropriately, which wont be trivial.

I've created a distinct question for this fourth point:
http://stackoverflow.com/questions/3970366/how-do-i-auto-layout-boxes-on-a-flowchart

Update 2:
From that other question, I have discovered GraphViz which can visualise graphs from data - and I've created a 'digraph' from my data - so all I need is a way to convert the output of GraphViz into something which OpenOffice Draw can accept. The obvious thought there would be SVG, but it seems OpenOffice hasn't implemented SVG properly yet, so I need to come up with another plan.

解决方案

You could try api.openoffice.org. Let me know how that worked out for you.

这篇关于如何生成OpenOffice绘图文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆