How to merge documents in LibreOffice Writer?
Thread poster: Hans Lenting
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
Mar 4, 2023

How can I merge documents in LibreOffice Writer in such a way that the formatting of the individual documents is maintained (headers, footers, page orientation, margins etc.)?

What is a good forum to ask questions about LibreOffice Writer?


 
Jennifer Levey
Jennifer Levey  Identity Verified
Chile
Local time: 11:00
Spanish to English
+ ...
Master Document ... ? Mar 4, 2023

I think this should be possible using a Master Document (MD).

Styles in the MD override any styles with the same name in each sub-document. To preserve the sub-document page styles (orientation, margins, headers, etc.) they will need to have page style names that are different to those in the MD.

I suggest you create and apply a new page style for the MD and give it a name other than Default Page Style. Then insert the sub-documents.

If all
... See more
I think this should be possible using a Master Document (MD).

Styles in the MD override any styles with the same name in each sub-document. To preserve the sub-document page styles (orientation, margins, headers, etc.) they will need to have page style names that are different to those in the MD.

I suggest you create and apply a new page style for the MD and give it a name other than Default Page Style. Then insert the sub-documents.

If all else fails, you could try asking the LO forum: https://ask.libreoffice.org (requires registration).

A list of existing forum topics relating to LO Master Documents can be found here: https://ask.libreoffice.org/search?q=master%20document%20page%20style .
Collapse


esperantisto
 
Tiberiu Leon
Tiberiu Leon
Local time: 18:00
English to Romanian
+ ...
Insert... Section... Mar 5, 2023

If you just need a dynamic link with other files, just insert in the final document as many sections as there are files to insert and link each section to the relative document.
Any changes to the individual documents will be found in the final document containing the sections.

As stated above, you may use a Master Document.


Or you may do it outside LibreOffice:
Convert documents: the solution is the --headless option, which executes LibreOffice proce
... See more
If you just need a dynamic link with other files, just insert in the final document as many sections as there are files to insert and link each section to the relative document.
Any changes to the individual documents will be found in the final document containing the sections.

As stated above, you may use a Master Document.


Or you may do it outside LibreOffice:
Convert documents: the solution is the --headless option, which executes LibreOffice processes without launching the graphical user interface.

Convert a document to EPUB:
libreoffice --headless --convert-to doc example.odt

Using wildcards means you can convert dozens of documents at once:
libreoffice --headless --convert-to doc *.odt

Formats to convert files: PDF, HTML, DOC, DOCX, EPUB, plain text...
Collapse


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Simply adding to an MD is not enough Mar 5, 2023

Thank you, Jennifer. I should have written that I had already tried that.

On Reddit I got this answer:
I believe if you paste in the new document as a section, it should keep your basic formatting, including separate page numbering. There's a setting in the add new section dialog that allows you to preserve page numbering if the section you're adding has separate page numbers.

For example, I combined several different documents into one larger document, so I can find & replace variables once, rather than several separate times. The resulting mega-document has all the original page numbers, so each separate document within the mega-doc starts at page 1.

One detail to keep in mind, I applied the same styles (paragraph, headings, footer) throughout the entire mega-document. I'm not 100% sure if you can keep different defined styles from section to section, so you may want to search the Wiki for details/documentation.


This is what I suspected, since it works like this in Ms Word too. I'll ask whether this procedure can be automated.


 
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
TOPIC STARTER
Too complex Mar 8, 2023

Hans Lenting wrote:

This is what I suspected, since it works like this in Ms Word too. I'll ask whether this procedure can be automated.


People with knowledge of LO tell me that this merging while keeping the formatting is too complex. They advise me to use pdf files instead and merge them.

Since most jobs are in docx format, I can use this alternative.

Mac users can also use this solution.


[Edited at 2023-03-08 10:06 GMT]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to merge documents in LibreOffice Writer?






CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »