3

How can I convert LibreOffice Master Document which consists of several .odt files into a single .odt file‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌?

2 Answers 2

3

The contents of any of the open document formats are simply ZIP files, so one could use unzip to unpack their contents.

To see the contents

$ unzip -l MasterDocumentTemplateDR.odm 
Archive:  MasterDocumentTemplateDR.odm
  Length      Date    Time    Name
---------  ---------- -----   ----
       46  02-04-2012 22:16   mimetype
      111  02-04-2012 22:16   Pictures/100002000000000C0000000CC1B54C41.gif
       97  02-04-2012 22:16   Pictures/100002000000000A0000000AD0B8BA86.gif
    10389  02-04-2012 22:16   Pictures/100000000000028F000001ED1B3CF428.jpg
    13036  02-04-2012 22:16   Pictures/10000201000000960000005E2C8645FE.png
      103  02-04-2012 22:16   Pictures/100002000000000A0000000A1F4FBE6C.gif
     1438  02-04-2012 22:16   meta.xml
     9005  02-04-2012 22:16   settings.xml
    48009  02-04-2012 22:16   content.xml
    10830  02-04-2012 22:16   Thumbnails/thumbnail.png
      427  02-04-2012 22:16   layout-cache
      899  02-04-2012 22:16   manifest.rdf
        0  02-04-2012 22:16   Configurations2/popupmenu/
        0  02-04-2012 22:16   Configurations2/images/Bitmaps/
        0  02-04-2012 22:16   Configurations2/toolpanel/
        0  02-04-2012 22:16   Configurations2/statusbar/
        0  02-04-2012 22:16   Configurations2/toolbar/
        0  02-04-2012 22:16   Configurations2/progressbar/
        0  02-04-2012 22:16   Configurations2/menubar/
        0  02-04-2012 22:16   Configurations2/floater/
        0  02-04-2012 22:16   Configurations2/accelerator/current.xml
   155673  02-04-2012 22:16   styles.xml
     1808  02-04-2012 22:16   META-INF/manifest.xml
---------                     -------
   251871                     23 files

To unzip the contents

$ unzip MasterDocumentTemplateDR.odm

$ ls -l
total 248
drwxrwxr-x. 11 saml saml   4096 Jul 11 16:23 Configurations2
-rw-rw-r--.  1 saml saml  48009 Feb  4  2012 content.xml
-rw-rw-r--.  1 saml saml    427 Feb  4  2012 layout-cache
-rw-rw-r--.  1 saml saml    899 Feb  4  2012 manifest.rdf
drwxrwxr-x.  2 saml saml   4096 Jul 11 16:23 META-INF
-rw-rw-r--.  1 saml saml   1438 Feb  4  2012 meta.xml
-rw-rw-r--.  1 saml saml     46 Feb  4  2012 mimetype
drwxrwxr-x.  2 saml saml   4096 Jul 11 16:23 Pictures
-rw-rw-r--.  1 saml saml   9005 Feb  4  2012 settings.xml
-rw-rw-r--.  1 saml saml 155673 Feb  4  2012 styles.xml
drwxrwxr-x.  2 saml saml   4096 Jul 11 16:23 Thumbnails

Converting a ODM to ODT file

If you go under the "File" menu there's a menu item called "Export". Selecting this will bring up the following dialog, from where you can "export" your .odm file to the .odt file format.

                                     ss #1

    ss #2

Which will result in a .odt file being produced.

$ ls -l
total 136
-rw-rw-r--. 1 saml saml 59383 Feb  4  2012 MasterDocumentTemplateDR.odm
-rw-rw-r--. 1 saml saml 52176 Jul 11 16:54 MasterDocumentTemplateDR.odt
12
  • How does this answer the question?
    – user
    Jul 11, 2014 at 20:30
  • @MichaelKjörling - the contents of the .odm file are already split up into several .odt files. The only piece this is missing is the mashing of the .odt files into a single one. But to answer that would be highly dependent on what's in the .odt files, IMO. I need more info and for the OP to first acknowledge that they're aware of this.
    – slm
    Jul 11, 2014 at 20:38
  • I can access each individual .odt file in the .odm file. I'm looking for a method to save the .odm file as a big .odt file. Jul 11, 2014 at 20:51
  • @MinimusHeximus - what about anything else that's potentially inside it? Notice the example I showed, does your .odm file contain only .odt files?
    – slm
    Jul 11, 2014 at 20:52
  • 1
    @slm No problem - I downvoted the answer because I felt it wasn't useful in answering the question, and with your edits, it now does answer the question so a downvote has no place IMO.
    – user
    Jul 12, 2014 at 12:11
1

I had several .odt files. I added them in an .odm file. Then as in the other answer I exported the .odm file into an all_in_one.odt file.

the all_in_one.odt file depends on the original .odt files, if they are deleted all_in_one.odt will be empty. To solve this I pressed F5 then I right clicked on the original .odt file in the Navigator window and chose Edit and unchecked Link and Protected and checked Editable: enter image description here

more

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .