hi Graham, On 09/07/12 16:53, Graham Weatherup wrote:
> The above link also directs to a description of how to unzip it in > java** so I figured I should be able to zip the files up and open it > again with Open Office. When I zip the files with java.util.zip using > the method here*** the file called ‘mimetype’ comes out “compressed” > but actually bigger and even setting compression off in the its still > bigger but not as much 41bytes vs 43bytes (I don’t remember the numbers > exactly) but not the 39bytes that is required. Also I read on a linux > forum that I cannot find that mimetype has to be ‘at the beginning’ of > the file. there are very specific requirements on the "mimetype" file that are likely difficult for generic zip libraries etc.; note that there is an ODFDOM project that is a Java library that supports the ODF package specification directly so it makes this kind of thing much easier (it will also maintain the manifest automatically for you); it is now part of the Apache ODF Toolkit project. http://incubator.apache.org/odftoolkit/ if you use a generic zip library then you should really read the ODF 1.2 part 3 specification to understand the special requirements. > Also I wonder if there are any files that should be updated if tables > get added etc. any other files in the ODB file? i'm not familiar with the database part of ODF, but i could imagine it contains meta-data like column descriptions and such; for details refer to ODF 1.2 part 1 specification. https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice