On 09/05/14 22:27, Jonny wrote:
Hi,
I am using some tools to generate odf-documents. In order to convert
them to pdf I'm using writer, but I need to run the function
tools->update->all for updating TOC.
I thought that I would write a python script for doing this but I would
like to call the libraries directly and not via UNO. My script would
look something like:
import libreoffice
document = libreoffice.Writer('path/to/my/document.odt')
document.update('all')
document.save()
document.close()
What I need is some guidance to in which libraries the functionallity
for open, update and save are located. I have been digging around in the
code without success. If someone has an idea it would save me a lot of time.
the problem is that that's all implemented in C++, but worry not, you
can just use UNO to call the C++ code :)
to do this first get the indexes from the document and then use the
update method, as described here:
https://wiki.openoffice.org/wiki/Documentation/DevGuide/Text/Indexes_and_Index_Marks
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.