Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


On 18.01.19 13:05, LORENZO Vincent wrote:
Hello everybody,

                I know the odt file is a kind of zip file. I would like to add folders and files in it programmatically, but I don’t know how to proceed.

I tested manually with 7-zip, but at the end the odt file is corrupt. I tried with java ZipFile class, but it fails too. So I would like to know if a such API exists and where can I found example for it ?

The files I want to add won’t be linked to the contents of the document, I just want use the odt file to store additional files like into a zip.

you need to keep the META-INF/manifest.xml consistent with the zip structure.

guess the easiest is to use ODFDOM library, which you can get at
https://github.com/tdf/odftoolkit

there's some class that can load & store ODF packages and it maintains the manifest automatically for you.

i'm afraid the documentation is currently offline because the project is currently migrating off of ASF infrastructure.

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.