【问题标题】:Margin Openoffice python保证金 Openoffice python
【发布时间】:2012-05-23 08:35:38
【问题描述】:

我一直在搜索,没有任何结果,所以我会在这里尝试一下。我正在尝试使用 Python 为 OpenOffice 制作文档。我只是找不到如何设置文档的上边距。有人知道怎么做吗?

提前致谢!

【问题讨论】:

  • 您是在编写 openoffice 脚本,还是使用工具创建 ODF 文件的 XML?

标签: python openoffice.org openoffice-writer uno


【解决方案1】:

这样的事情似乎对我有用(在 Python 宏上下文中):

import uno

def setMargin():
    doc = XSCRIPTCONTEXT.getDocument()
    oStyle = doc.StyleFamilies.getByName("PageStyles").getByName("Default")
    oStyle.TopMargin = 5000  #Not sure what the units are

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-07
    • 1970-01-01
    • 2023-03-26
    相关资源
    最近更新 更多