Hi Regina,

On Wed, Mar 27, 2013 at 11:21:11PM +0100, Regina Henschel wrote:
> Hi all,
> 
> when I open a .odp file with 7z, I can edit the content.xml with an
> editor. The file is then updated inside the zip-container. But 7z
> orders the files and folders alphabetically and therefore the file
> mimetype is no longer at first position.
> 
> I have already tried to add the files and folders one by one. But 7z
> does not keep the order in which the files are added to the
> container, but still sort them alphabetically.
> 
> Apache OpenOffice itself is tolerant and opens the file
> nevertheless. But the file is not valid. I cannot use AOO to save
> the file, which would bring the parts in the correct order, because
> AOO alters the content when saving and my changes are lost.
> 
> Does anyone know, how I can pack the parts, so that it will be a
> valid ODF zip-container?

Didn't you try zip/unzip?
All of the following should be available in your cygwin:

only take the content.xml out of the ODF file:
]$ unzip demo.odg content.xml
Archive:  demo.odg
  inflating: content.xml 

indent it, to make it more readable:
]$ xmlindent -w content.xml

edit it (vim has syntax highlighting):
]$ vim content.xml

put the modified content.xml back:
]$ zip demo.odg content.xml
updating: content.xml
(deflated 84%)


If you get a warning like this:
        zip warning: Local Entry CRC does not match CD: content.xml
It's just a warning, the file can be opened safely (nevertheless, best
back up it before playing with all this) vid.
http://softsolder.com/2010/07/25/


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: pgpyfIhGb3zHC.pgp
Description: PGP signature

Reply via email to