(Sub)documents not displaying properly in large file

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
Athildur
Posts: 5
Joined: Mon Feb 13, 2017 9:32 pm

(Sub)documents not displaying properly in large file

Post by Athildur »

Here is the issue I am having:
- I am working on a large file (currently near 350 pages, expecting 500+ when done). This includes text (occasionally split into columns) and a large number of tables and frames containing tables or figures.
- As I understand it, and from personal experience, OpenOffice has trouble processing documents of such large sizes, leading to some instability. This has led me to use a Master document instead.
- However, now that I've gotten back up to the higher page numbers, the master document still has issues displaying the contents properly: oftentimes, i see seemingly random areas of empty lines or even multiple consecutive blank pages for no discernable reason (there are no page breaks or unusual text structures or formats in those areas).
- In addition, the document seems to 'lag' when loading (after a few minutes content starts 'shifting' around, presumably as it starts to correct wrongly displayed contents)
- Even so, after 10 minutes now, it is still not displayed correctly, there are still randomly inserted empty pages.
- I have deduced, perhaps incorrectly, that it cannot be my own formatting: the areas where issues come up are different every time the master file is opened (the blank pages or empty lines appear at different places each time, and places where it would previously appear are now no longer displayed incorrectly)
- When exporting the file to PDF, displayed errors persist.
- One thing I have noticed is that making OpenOffice give a page preview (or is it a print preview?) seems to 'force' the program to update, and it displays the 'correct' formatting (sometimes I need multiple tries to get the whole document 'proper' again). This reinforces the idea that this is not an error on my part, but a limitation on the program's part.

Does anyone know of a way this might be mitigated or avoided? I ultimately need all these files as a single result, and expect to be updating and editing the document frequently as updates are added and readers notice some mistakes in spelling or consistency (which is fine, this is a free time project so nobody's expecting flawless results on the initial release), and I don't want to have to go through this every time I want to create a new version of the file...

(Side note: I've created a table of contents, which automatically generates, but the links it contains, though clickable, don't work. Instead of jumping to the indicated section, it just kind of 'hops' you a few lines down, as if you'd given your scroll wheel a little tug. Any advice would also be appreciated)
OpenOffice 4.1.2, Windows 7 x64
User avatar
Hagar Delest
Moderator
Posts: 32665
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: (Sub)documents not displaying properly in large file

Post by Hagar Delest »

Hi and welcome to the forum!

My longest document is 1,200 pages long with around 2,000 tables and quite a lot of pics also. No problem with display or ToC and so on. Never had any instability. Even when it's open with other heavy documents.
The only thing is that it takes 20 sec to open. And some time to close also.

Have you tried to reset your OpenOffice user profile?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Athildur
Posts: 5
Joined: Mon Feb 13, 2017 9:32 pm

Re: (Sub)documents not displaying properly in large file

Post by Athildur »

Thank you for the reply!

I have followed your suggestion of resetting my user profile.

After opening the file again, the file still requires a lot of time to open, with contents 'jumping' around as I scroll around (as it seems to be trying to update the formatting properly as I go past it). For example, when I opened the file, it said it was 270 pages. It is now at 356, and I'm getting the white spaces again.

The only thing I can think of is that it has to do with the frames I'm using, as the 'offset' I get often (though not always) involves a section of text with a frame attached to it. I am going to attempt to replace as many frames as possible with tables (the frames were used to hold tables. Initially because most tables required text wrap around them. Some don't, but I just copy-pasted frames to minimize the work, so I'll try replacing those with normal tables). Hopefully this will alleviate most of the issues I am having.

Since what I'm working with is based on someone else's work I can't share the files, but here is a screenshot to illustrate. (The subfile was saved, then the master file was told to update it, then the screenshot was made).
Image

As is clearly visible, the formatting is not well placed within the master file, even though it is formatted correctly within the subdocument. I am at a loss for what causes such discrepancies.

Edit: I have reinstalled OpenOffice (I tried to update but for some reason all the registry keys pointed to a nonexistent drive. So I uninstalled OO, cleaned my registry, then reinstalled), and I am now faced with a new problem: certain frames have just completely gone missing in the master document! They're still there in the subdocuments (anchored to the page), but in the master document, they simply don't load/display at all! I have several nearly identical frames throughout this particular chapter. The first few show up correctly, and the ones after that are simply gone...
OpenOffice 4.1.2, Windows 7 x64
User avatar
Hagar Delest
Moderator
Posts: 32665
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: (Sub)documents not displaying properly in large file

Post by Hagar Delest »

Anything linked to the page in the sub-documents is not taken into account in the master document IIRC.
Try to change the anchor to paragraph and see if that helps.
I think that tables will be more robust. And anchor objects As Character as much as possible. Computing frame position may be the weak point of the page formatting.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Athildur
Posts: 5
Joined: Mon Feb 13, 2017 9:32 pm

Re: (Sub)documents not displaying properly in large file

Post by Athildur »

I won't have time to do it today but I will attempt your suggestion first thing tomorrow and report back, thank you :)
OpenOffice 4.1.2, Windows 7 x64
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: (Sub)documents not displaying properly in large file

Post by keme »

This looks like a "keep with next" issue. Look at the paragraph style used for property/capability lists. Does that style specify "Keep with next" in your master document? (The "text flow" tab in paragraph style settings.)
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
Athildur
Posts: 5
Joined: Mon Feb 13, 2017 9:32 pm

Re: (Sub)documents not displaying properly in large file

Post by Athildur »

Hagar Delest wrote:Anything linked to the page in the sub-documents is not taken into account in the master document IIRC.
Try to change the anchor to paragraph and see if that helps.
I think that tables will be more robust. And anchor objects As Character as much as possible. Computing frame position may be the weak point of the page formatting.
I've tried anchoring them to paragraph (to the text immediately above them), but it does not seem to work. Anchoring it to a character did work in a way: It's now displayed in the master document, but it's not positioned correctly (in the master document, the frame is about half a centimeter off)
keme wrote:This looks like a "keep with next" issue. Look at the paragraph style used for property/capability lists. Does that style specify "Keep with next" in your master document? (The "text flow" tab in paragraph style settings.)
None of the styles I use have 'keep with next' except for the headers I use to indicate chapter titles and topic titles (none of which are causing me issues). Would enabling this function help to mitigate these issues?


Also, as an observation, whenever I tell the master document to update one or more of its subdocuments, the page number goes up, as if it's tried inserting the new pages without removing the old. Once I scroll up and down the whole document, most of these extra pages will disappear, but occasionally this leads to the 'faulty formatting' I've been experiencing.
OpenOffice 4.1.2, Windows 7 x64
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: (Sub)documents not displaying properly in large file

Post by keme »

Athildur wrote:...
keme wrote:This looks like a "keep with next" issue. Look at the paragraph style used for property/capability lists. Does that style specify "Keep with next" in your master document? (The "text flow" tab in paragraph style settings.)
None of the styles I use have 'keep with next' except for the headers I use to indicate chapter titles and topic titles (none of which are causing me issues). Would enabling this function help to mitigate these issues?
...
NO!
Quite the opposite. It is when this setting is over-used you get into trouble, and erratically varying page count is a typical symptom. However, pagination gone wild is possible also with footnotes when they are near the bottom of a page. (Space required for a footnote will cause the body text to break before the page ends. If the footnote marker is in the lines that would then be moved to next page, a deadlock appears.)

When Writer must handle content that fills more than a page, or more than a column when you have multiple columns, and no page/column breaks are allowed, it just determines a "most likely spot" and breaks there. That spot is not likely to be optimal from the user's (your) view. If you didn't use it, forget my suspicion above. I was wrong...
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: (Sub)documents not displaying properly in large file

Post by John_Ha »

Athildur wrote: i see seemingly random areas of empty lines or even multiple consecutive blank pages for no discernable reason (there are no page breaks or unusual text structures or formats in those areas).
This is a correct, but annoying "working as designed" behaviour and is caused by poor location of images relative to their anchors. I used to see it frequently until I worked out what I think is probably happening.

What I think happens is that as Writer pulls in a sub-document and lays it out in the entire document, an image cannot be located on a given page because there is not enough space for it. Writer then spills some text to make room for the image ... which drags the image anchor down with it to the next page ... which then drags the image down to the next page ... which leaves a large space above ... so Writer pulls back text to fill it ... which pulls back the image anchor ... which promptly pulls back the image ... which does not have enough space for it ... which causes Writer to spill the text ... which is where it all began. This looping would go on for ever but Writer seems to have a time limit which breaks the loop leaving the images located where they were at the time the loop was broken.

My solution is always to anchor images To a paragraph, and to locate the image close to the anchor, aligned with it or just below the anchor. I also make absolutely certain all my sub-documents have identical page formats to the master document. You must not Anchor to page when using a master document.

A very useful workaround while editing is to insert redundant New Pages every now and the gaps they create catch any spills and prevent the spills rippling the entire way through the document like a domino rally. As you can imagine, spilling an early image can cause havoc in a large document - it is no wonder it takes ages to layout :crazy: Delete them when you finalise the document. Also, leave plenty of time for layout to take place before scrolling. When you get the problem, Update All, or Update the section below the gap.

Tables seem particularly prone to "gap" problems for reasons I have not yet deduced - a table often gets cut, with the next rows pushed down to the next page leaving a gap many rows high between the two parts.

Second, even though I use identical page formatting for all sub-documents and for my master, when a sub-document is pulled into a master, Writer wrongly inserts a gap at the very top of the first page, equal in size to the "gap above text to paragraph border" in the first paragraph of the sub-document being pulled in. I have raised this bug report Issue 127205 - Additional space added in Master document which is not present in the sub document and is equal to 'Paragraph > Spacing > Gap to Top border'. This gap may only be 0.5mm for me, but it can cause the last line on that page to spill ... which, domino like, ripples its way though the whole file causing many later pages to layout completely differently in the master compared with their sub-documents.

I have responded to several threads about this - searching my posts with +spill +gap +anchor gets these.

NB See [Tutorial] Some useful hints on using images for a discussion on how best to handle images in Writer.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Athildur
Posts: 5
Joined: Mon Feb 13, 2017 9:32 pm

Re: (Sub)documents not displaying properly in large file

Post by Athildur »

John_Ha wrote:This is a correct, but annoying "working as designed" behaviour and is caused by poor location of images relative to their anchors. I used to see it frequently until I worked out what I think is probably happening. [...] NB See [Tutorial] Some useful hints on using images for a discussion on how best to handle images in Writer.
Thank you for that informative response, I will be spending some time familiarizing myself with these topics and will try to implement that knowledge and report back in a few days.

EDIT: I've done a quick, minor edit on a 'faulty' page. While this is not yet conclusive evidence, after I moved my anchor somewhere else (despite your recommendation, I moved it 'up' as the master document seemed to want to move the frame with all the text around it (8 small paragraphs, wrapping around it) down a few pages, despite the fact that it all 'fits' with room to spare (there are two empty paragraphs below it before it reaches the bottom of the page). Now that it's anchored to a header slightly above it, everything seems to stay in place.

I will spend some time tonight editing and updating a lot of other frames in the hopes that this will alleviate most of my issues. I am cautiously optimistic at this point :D
OpenOffice 4.1.2, Windows 7 x64
Post Reply