Ask Your Question

How to remove date stamp from changes and comments? [closed]

asked 2014-05-29 11:45:46 +0200

KimmoL gravatar image

updated 2020-07-12 12:46:41 +0200

Alex Kemp gravatar image

Lawyers, writers, editors and others dealing with sensitive text documents have a need to remove metadata from changes and comments. This feature seems to be nonexistent in LO Writer.

Example: I am a writer/editor/translator. Clients send me documents for review or editing. The automatic date stamping of changes and comments allows them to monitor my work patterns, time of day when the work was done, and my time usage from the files I send back. None of this is their business.

Is there a way to get rid of change and comment metadata? If not built into Writer, maybe with an external script? This is important, and the lack of this feature is a serious drawback in Writer.

(Running LibreOffice on Linux Mint 13 Maya KDE)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-09-10 14:44:58.854914


I need too a way to remove these informations from comments, as I usually insert many comments in each page, so without metadata (author name and data) there is more space to insert other comments. I think it's a serious missing feature.

gidici gravatar imagegidici ( 2014-08-30 11:48:09 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2014-05-29 16:25:56 +0200

Lupp gravatar image

Not sure if this meets your needs: 'File'>'Properties ...'>'Security' ; 'Record changes' off.

edit flag offensive delete link more

answered 2014-05-29 16:36:32 +0200

mahfiaz gravatar image

updated 2016-08-13 21:10:20 +0200

Unzip a .odt file, it contains content.xml file. A comment looks like this:

<office:annotation office:name="__Fieldmark__1_514712390">
  <dc:creator>John Smith</dc:creator>
  <text:list text:style-name="">
    <text:p text:style-name="P2">
     <text:span text:style-name="T1">A comment text.</text:span>

Now all you need to do is replace all <dc:date>2014-05-29T14:38:39.846905891</dc:date> with a dummy date, e.g 2000-01-01T12:00:00.0 and save it back to original .odt file. Or why not use the date when document was created (in meta.xml): <meta:creation-date>2014-05-29T14:38:30.386644381</meta:creation-date>

The following python script does it for you and renames the file as name-clean.odt:


import glob, re, os, sys, zipfile

for pattern in sys.argv[1:]:
    for filepath in glob.glob(pattern):
        dirname, basename = os.path.split(filepath)
        root, ext = os.path.splitext(basename)
        newname = '%s-clean%s' % (root, ext)
        outpath = os.path.join(dirname, newname)
        zin = zipfile.ZipFile (filepath, 'r')
        zout = zipfile.ZipFile (outpath, 'w')
        for item in zin.infolist():
            if item.filename == 'mimetype':
        for item in zin.infolist():
            if item.filename == 'meta.xml':
                data =
                # Find the document creation timestamp.
                timestamp ='<meta:creation-date>([^<]+)</meta:creation-date>', data).group(1)
        for item in zin.infolist():
            if item.filename == 'content.xml':
                data =
                # Replace all occurrences of date in <dc:date>
                data = re.sub('<dc:date>[^<]+</dc:date>', '<dc:date>%s</dc:date>' % timestamp, data)
                zout.writestr(item, data)
            elif item.filename != 'mimetype':
edit flag offensive delete link more


This deals only with comments, but looks like you need to save changes without date as well. Feel free to modify the script to your needs.

mahfiaz gravatar imagemahfiaz ( 2014-05-29 16:44:00 +0200 )edit

@mahfiaz your python script is so cool! It did the trick. However, it showed a warning: " UserWarning: Duplicate name: u'mimetype' zout.writestr(item," What this warning means, please?

Tatui gravatar imageTatui ( 2016-02-11 09:32:03 +0200 )edit

It warns that file named mimetype is already in the zip (it was added on line 15, because mimetype file has to be the first in zip). It means the zip is kind of malformed, (contains two files with the exact same name). It is no problem for any viewers I have used nor for LibreOffice.

To get rid of the warning you could change line 18 from else: to elif item.filename != 'mimetype':

I did this change in the script above.

mahfiaz gravatar imagemahfiaz ( 2016-08-13 21:09:02 +0200 )edit

answered 2014-08-22 10:26:30 +0200

ozymandias24 gravatar image

This does not remove all the metadata from a Writer document. There are still Author names and time stamps on all the comments you add.

Does anyone know how to remove these?


edit flag offensive delete link more


What would "this" refer to?

mahfiaz gravatar imagemahfiaz ( 2014-09-07 11:24:49 +0200 )edit

answered 2015-04-01 20:56:43 +0200

An enhancement request regarding this feature has now been filed:

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-05-29 11:45:46 +0200

Seen: 7,260 times

Last updated: Aug 13 '16