OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

opendocument-users message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [opendocument-users] Fixing corrupted odt

In addition to what Rob Weir provides, here is more if the corruption is related to the Zip package rather than an individual XML part.

Use the "test" options of Unzip packages of various sorts to get a report of the contents of the zip package and identification of the specific internal files that are corrupted.  You should be able to extract all of those that are not considered corrupted.

Plan A:

You can use a Zip utility to put content.xml, META-INF/manifest.xml, styles.xml, and meta.xml into a Zip along with any images and other parts.  Match the "folder" structure of the original .odt Zip package.

After moving what you can recover into a fresh Zip package, rename it as a .odt file.

See if that will open any better.  

You may have to edit manifest.xml to drop anything in the manifest that couldn't be recovered.  If there are image and drawing files that can't be recovered, that may prevent opening of the .odt in OpenOffice if they are referenced in the document and cannot be found in the recovered Zip.   

Plan B:

You might have some luck using one of the converters for opening ODF files in other applications (e.g., the OOXML-ODF translator and other such tools).  These may be more forgiving on either the original Zip or a sanitized one that has the corrupted files replaced or simply removed.  You may need to put in dummies for unrecoverable images.

Then do a reverse translation or import back into OO.o.  This may still require considerable manual work, but it should be better than working with just content.xml by itself.

Of course, having a backup of a previous version of the original file might also provide a way to restore missing material.

 - Dennis

PS: I see an opportunity for some ODF package forensic and recovery tools.  Maybe the ODF Toolkit folks have something that would help as well.

Dennis E. Hamilton
NuovoDoc: Design for Document System Interoperability 
mailto:Dennis.Hamilton@acm.org | gsm:+1-206.779.9430 
http://NuovoDoc.com http://ODMA.info/dev/ http://nfoWorks.org 

-----Original Message-----
From: Chris Puttick [mailto:chris.puttick@thehumanjourney.net] 
Sent: Wednesday, August 19, 2009 08:26
To: opendocument-users
Subject: [opendocument-users] Fixing corrupted odt

Hi all

One of our users has managed (in an undocumented process ;) ) to corrupt an important document. While unzip of various guises works i.e. we can acquire content.xml and other elements, much of the importance of the document was related to its layout which is harder to acquire. Are there any tools that can be used to fix the file or identify the issues causing the problem?

Notes: created in OpenOffice 3.x (probably .1) and worked on in 3.1 (and nothing else as far as is known). OpenOffice reports "Error reading file" with no additional information. KOffice reports "The file <filename>.odt is a binary, saving it will result in a corrupt file." Googledocs struggles on for about 10 minutes then reports "We encountered an error converting your file. Sorry, that file is corrupt, or an unknown format."

All suggestions welcome...



Chris Puttick
Oxford Archaeology: Exploring the Human Journey
Direct: +44 (0)1865 980 718
Switchboard: +44 (0)1865 263 800
Mobile: +44 (0)7917 058 568

Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.

To unsubscribe, e-mail: opendocument-users-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: opendocument-users-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]