1

I have a lot of .odt documents. How can I attach them together without hurting their contents?

Copy and paste in LibreOffice is not safe and may change the format. For example, the position of sliders for lines may be forgotten.

  • If you mean into one document, LibreOffice calls that a "master document". If you just want into one file, tar or zip? Please clarify which you mean. – derobert Apr 8 '14 at 1:36
  • into one document‌‌‌‌‌‌‌‌‌‌‌. – user62511 Apr 8 '14 at 1:38
1

LibreOffice calls one document made up of many sub-documents a "master document".

  1. File -> New -> Master Document. You have to use the menu; it's not in the splash screen.
  2. In the Navigator that pops up, click the Insert icon, the select "File"
  3. Select your files. You may select multiple files using Shift-click or Control-click.
  4. Press insert.
  5. Repeat the "Insert" step as many times as needed.
1

Take a look at the tool OOoPy. One of the tools included with this toolset is called ooo_cat which does what you want.

ooo_cat for concatenating several OOo files into one

Installation

After downloading it you can install the tool set like so:

$ python setup.py install

After which ooo_cat will show up on your $PATH. Usage is pretty straightforward:

$ ooo_cat --help

Usage: ooo_cat [-o|--output-file ] [file, ...]

Options: -h, --help show this help message and exit -o OUTPUT_FILE, --output-file=OUTPUT_FILE Output file (defaults to stdout)

Example

Say I have this fake document named out2.odt. I can concatenate it as many times as I want like so:

$ ooo_cat -o new.odt out2.odt out2.odt

The resulting new.odt:

$ ls -l new.odt out2.odt
-rw-rw-r--. 1 saml saml 10061 Apr  7 21:52 new.odt
-rw-rw-r--. 1 saml saml  9816 Apr  7 21:40 out2.odt

Now when we open it up:

$ ooffice new.odt

    ss of new doc

NOTE: There are 2 copies of out2.odt in new.odt now. Above is showing the 2 pages side by side for reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.