1

As you probably know, an .odt file is just a .zip file containing some folders and .xml files.

I used to appreciate this, for I could make a document template using $KEYWORDS$ that I could later replace using a script (e.g. PHP) to replace these $KEYWORDS in template.odt/content.xml. This worked in 2010 with Open Office.

In 2011 however, when the template was created using a new release of Open Office or the newly released LibreOffice, this trick introduced a problem: On opening the 'filled out' template.odt file, LibreOffice would complain that the file was damaged. The "repair" option made the document work agian. Odd, but still workable.

But in 2012, creating a template with the latest version of these programs, hitting the "repair" option caused a blank page to appear. The trick was now officially unusable.

The file structure of the .zip (.odf) file looks the same to me. It doesn't look like something has changed, but it must have. It is as if a hash is created, and when the contents change without the hash changing, the software 'decides' to be unable to repair the document.

What has changed in the document format? Is there a way I can still 'automate' my files this way?

With the release of LibreOffice 4.0 I remember this question of mine is still an issue I am working with, although the superuser.com question did not receive much attention.

Community
  • 1
  • 1
Redsandro
  • 11,060
  • 13
  • 76
  • 106
  • Is this the best forum to ask this question in? I would think that one of the [Libre Office mailing lists](http://www.libreoffice.org/get-help/mailing-lists/) might be a more direct route to an answer. – Peter Rowell Feb 07 '13 at 17:26

0 Answers0