Hi Annika,

the ODF Specification requires that a "mimetype" file is stored as the FIRST entry in the package and that it is stored uncompressed you have to make sure that this is the case when you "zip your document back".

If you are using a "zip" command line client on Windows for example you can use the following sequence of commands from within the directory containing the content:

zip -0 ..\barfoo.zip mimetype
erase mimetype
zip -r -S -u ..\barfoo.zip *
move ..\barfoo.zip ..\barfoo.odt

Kind regards,
Bernd Eilers


On 01.12.2010 14:27, Annika Westerlaken wrote:
You're right, I was doing something wrong, it was probably because I
created a new zip file like Niklas said. Tried it again and it works
just fine. Though I could have sworn I had already tried that, but I
guess not then, and I'm not complaining about finally solving this.
Sorry for inconveniencing all of you. Thanks for your input, this issue
has been solved.

-----Oorspronkelijk bericht-----
Van: Ariel Constenla-Haile [mailto:[email protected]]

Verzonden: woensdag 1 december 2010 14:21
Aan: [email protected]
Onderwerp: Re: [dev] Re: Code for Pictures

Hello Annika,

On Wednesday 01 December 2010, 10:01, Annika Westerlaken wrote:
  
Thanks for your input. You're right about the entry being needed in
manifest.xml, that was already taken care of however. I'm sorry for
    
not
  
being clear enough in my initial message.

If I were to unzip an odt file containing a picture and rename this
picture in content.xml, manifest,xml and the actual file in the
    
Pictures
  
folder and rezip it, OOo will ask to repair the document when I try to
open it.
    

my guess is you might be doing something wrong. 
I've tried this manually and worked ok:

* unzip the odt document
* rename the picture
* change the content.xml and META-INF/manifest.xml
* zip the document back

OOo opens the modified document just fine, no warnings at all:
http://arielch.fedorapeople.org/devel/ooo/test_orig.odt
http://arielch.fedorapeople.org/devel/ooo/test_modif.odt

Regards
  


--


Bernd Eilers | Software Engineer
Phone: +49 40 23 646 967

ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

Oracle is committed to developing practices and products that help protect the environment



Reply via email to