问题描述
我正在尝试将Python中的一些文本导出到我根据这些创建的Libre/OpenOffice Writer文档中说明.
I am trying to export some text from Python into a Libre/OpenOffice Writer document which I created according to these instructions.
例如,使用
cursor.setPropertyValue("CharHeight", 20)
cursor.setPropertyValue("CharWeight", 150)
document.Text.insertString(cursor, "This Is Heading One", 0)
我可以使一行文本看起来像一个标题,但这只是文本,而不是实际的标题.我必须修改哪些属性值才能生成为目录选择的标题行?
I can make a line of text look like a heading, but it's just text and not an actual heading. What property values do I have to modify to generate a heading line that's picked up for the TOC?
通常,属性的文档在哪里,以及通常如何导航Writer文档?我很难挖掘所有东西!
In general, where is the documentation for the properties, and how to navigate the Writer document in general? I'm having a very hard time digging up anything at all!
推荐答案
我想这对 :) LibreOffice的论坛中也没有.
I guess this hasn't attracted much interest on stackoverflow :) Neither has it in the forum over at LibreOffice.
幸运的是,OpenOffice上的人们有一些很好的指导,而具有上述问题和更多问题的主题是此处.我将继续在那儿讨论文档创建的各个方面.
Fortunately, the folks over at OpenOffice had a few good pointers, and a thread with above questions and more is here. I'm going to keep discussing various aspects of document creation over there.
这篇关于使用pyUno将文本写入Libre/OpenOffice Writer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!