Images and drawing objects: arrangements are lost after reopening the document

Hello,

I’ve been in the process of switching from Microsoft Office to LibreOffice over the past few weeks. Most of my Excel spreadsheets migrated to ODS without any major issues. However, I’m running into some problems with a few ODT files that were originally saved as .docx.

Specifically, I’m having trouble with the positioning of images and drawing objects. I’ve already set the anchors and arranged everything so the images and drawing elements appear correctly. Once I save the document, everything looks fine. But when I close and reopen the file, things start to go wrong randomly.

Sometimes the background just disappears and turns completely white instead of showing the intended image. Other times, graphics that are supposed to be in the header background jump to the front or end up hidden behind the background. In the footer, I have three text boxes on top of a background image—and occasionally one or two of the text boxes will just vanish.

What’s even more confusing is that these issues don’t show up consistently across all pages. For example, the first 10 pages might look perfect, and then on page 11, a graphic is missing again because it’s been pushed to the background. I can’t figure out why this is happening—it all feels so random.

At this point, I’m honestly stuck and hoping someone out there might have a tip or some advice. This issue is currently holding up my full migration to LibreOffice.

Example

Footer after saving and arranging everything correctly:

Footer after closing and reopening the .odt file:

I’m having the same issues even when I open and save the .docx file directly in LibreOffice :-/

Thanks in advance! :blush:

My Version

Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

A few basic comments on migration:

My Migration from MS-Office to LibreOffice


Upload a reduced anonymized sample document here where the problem exists so someone can look at it and examine. Thank you.


English documentation

Hello Hrbrgr,

thank you very much for your message. I have anonymized the original document a bit. In parallel, I also took a few screenshots showing the correct and incorrect states.

My guess is that it might have something to do with the document size or something similar — that when opening the document, the information about the layout isn’t loaded quickly enough.

In my recent test, everything was fine for the first 8 times I opened it, but on the 9th time, the background image on the first page was gone.

I hope the error can be reproduced using the reduced document.

Here is a Google Drive link to a ZIP file. Unfortunately, I couldn’t upload it here because the file was considered too large, even at 2MB.

Password ZIP-File: LibreOffice#2025

Thanks for investigate!

The first page does not have a colored/checked background with me.

Distribution of page styles to the pages:
1-2 Standard
3-83 Converted 1
84 Converted 2
85 Converted 3

Improvement - it would make sense to divide them into:
1 Erste Seite
2 Inhaltsverzeichnis (to create new)
3-84 Standard
85 letzte Seite

You need a separate page styles for each page that is to be different.

  • attached as sample with 5 pages

Improvement - About the graphics:
For the first and last page, combine the graphics into one image in Draw.
Do the same with the header and footer.

Do not use separate text fields for the footer, but insert the text directly.


Example one Graphic for the first page:



Example ODT with Page styles:
MagentaCLOUD

Example ODG create one Graphic for the first page
120962 HB Example_LO-Forum.odg (734,2 KB)


Addendum:
Some text objects are in the background (Page 1 and last Page).
They can only be deleted via the Navigator.

Recommendation
Rebuild the file completely in Writer.

1 Like

I think you have 4 different pages styles, Front page, TOC, Default page and Final Page.
You can group the objects with the grid and create a png (or jpg) that is inserted in the Area tab of the page style.
With just the grid, you could take a small piece and tile it as I did for First Page and Final Page. The images I just locked for Size and Position (right click Properties > Position and Size > Protect). Because they are on only the first page and last page you don’t need to worry about wrapping or text flow.
[Edit]
Those images don’t need to be protected at all if you aren’t adding any more text to the page.

I cleaned up the paragraph styles a bit and put them back where they should be. Note the the paragraph style for the body of the document should be Body Text, not Default Paragraph Style, that is there to make global changes, such as changing from Calibri to Liberation Sans, not to appear in the document.

Konzeption.odt (796.1 KB)

You might like to refer to the chapter on styles in The Writer Guide, I think this is the German link Handbücher | LibreOffice Documentation - LibreOffice User Guides

1 Like

@Hrbrgr @EarnestAl : Thank you very much for your analysis and constructive contribution! I will test the suggestions and the sample file over the next few days and rebuild the document accordingly. Once I’ve done that, I’ll get back to you and provide some feedback :slight_smile:

1 Like

Hello,

Unfortunately, I was only able to start recreating the document in LO today. Based on the tips and sample files, I tried to replicate the formatting and so on, so I could understand it better. However, I can’t manage to get my header and footer to appear on every page (except the first one), even though the page styles seem correct to me.

I’ve uploaded the current version here:

https://drive.google.com/file/d/10mWqfJsnodDreo45q1BgfIJtnXPMaS0G/view?usp=sharing

Why aren’t the header and footer being duplicated on all pages? And why isn’t the text in the footer red, even though the paragraph style for the footer has been adjusted?

Thank you very much!

Simply because you didn’t anchor your drawing objects in header nor footer. You anchored them To page, i.e. you were in page 2 when you inserted the objects and they will remain forever anchored to page 2.

If you want them to repeat on every page, you must anchor them to a paragraph present in the header or footer. Note that anchoring by no means implies that the object is jailed in the anchor bounding box. In any anchoring mode (except As character), an object or frame can be sent anywhere in the page.

1 Like

New layout:
Page 1 has the page style First page (Erste Seite)
Page 2 has the page style Directory (Verzeichnis)
Pages 3 to , have the page style Standard

The graphics were not included in the header and footer because they were not anchored in the header and footer (fixed).

The font in the footer is red in my case.


Example ODT with Page styles and graphics:
MagentaCLOUD

1 Like

Thank you very much for the correction – I hadn’t suspected the anchoring :slight_smile:

You’re right, the text is red, just not when I write in the “image”, but I can easily change the color manually there – I had assumed that the footer style would also apply to the “Test by Crash” section.

Drawing objects are completely external to the style feature. They can’t be controlled by any style (even by frame style, which is a shame).

If you want full power and versatility on your footer, I’d suggest you don’t use a drawing object.

Enter your footer as normal footer text which is styled Footer. This style will control all aspects: alignment, font size and weight, colour, …

An image (like your chequered background), pattern or hatch can be attached as an Area configuration in the page style (go to Header or Footer tab, then More button).

Doing so, you’re back in the “standard” controls of Writer and you minimise the use of drawing objects.

2 Likes

Good morning,

The layout and formatting are now basically complete, so I could start migrating the content and other documents (which are also based on the layout) to LO.

Unfortunately, there’s still one thing I haven’t been able to get working despite several attempts, so I have to ask for help once more :slight_smile:

In the footer, the “Field Page Number” and “Field Statistics Pages” should be inserted all the way to the right, replacing the respective X — but it doesn’t work.

In the converted version (docx => odt), the fields are available and correctly display the page information — that doesn’t really help me, but it shows that it must somehow be possible.

So, my question is: How can I insert these two fields into the footer?

Thank you very much in advance for your help.

My current version of the ODT file: LO

That’s what people are here for, to help.

In my link above (MagentaCLOUD) you will find two new files.

The footers with the graphics were hidden and the page style “Dynamic height” was missing.

HB01 Now the graphics are saved in the page style, as @ajlittoz explained above.

HB02, the graphics were inserted in frames.

I hope it helps you.

1 Like

You cannot insert fields into drawing text.

You have already inserted a field in the footer in the form of Page number/Page count but it is underneath the picture and does not show because the footer is set to 0.10 cm high.

BTW Don’t anchor images to pages except in very particular circumstances, your last page image is fixed to page 7, not to the last page.

I think the biggest problem though is file size; this is from all the graphics. I have done a little optimisation, for instance all the checked backgrounds are done with a single image 11 x 11 pixels. A repeated image is stored only once. It might be that a somewhat larger image might be more efficient.
I have got the file size down to 387 kb from your 1181 kb. If this will be saved as a template then the saving in space should add up.
Konzeption2_EA.odt (386.4 KB)

1 Like

Thank you very much for your help. For me, the best solution was to put the footer into a frame. Everything looks fine at the moment, and I can insert the content. I’ll reach out again if I run into issues elsewhere or once I’ve finalized everything (I have about 90 pages that need to be transferred into different documents).

Avoid use frames when not necessary. Frames imply problems later, performance and stability amongst others.

In your case, configure adequately footer geometry in the page style(s). Type an “ordinary” footer in the footer area with the usual fields. Then add your background image. If it hides your header, it is “only” a matter of sending the image into the background. You can also set its wrap property to Through but sending it in the background is better.

If your footer references heading titles, you may meet strange behaviour in cross-references from frames (caused by insertion order of frames in the document).

1 Like

It was getting late last night so I didn’t think to optimise the image of children on the last page. It has transparency which it loses if it is converted to indexed colour (in GIMP). Happily, LibreOffice can apply the transparency so I set it at 40%. This results in a significant reduction in file size.
Konzeption3_EA.odt (136.0 KB)

1 Like

I didn’t even try placing normal text in the footer and putting the image in the background during all my attempts – but that actually works (without a frame). At first, I inserted the image first and then the text – that already caused a problem.

To conclude this thread: All documents have now been recreated, and my migration to LibreOffice is complete – MS Office can finally be uninstalled. Based on the experience I’ve had, others in my friends-circle have also decided to migrate to LibreOffice.

Many thanks again for the very constructive support.

1 Like