Inconsistent rendering, randomly inserted empty pages

Szervusz Tibor, nice to see you here!

  • odt

  • abt. 40 images and ~100 tables (some are just a single cell for formatting purposes, but half are proper full-blown tables)

  • 12 page styles (left page, right page, and “chapter start” style for each chapter due to the different full-page illustration)

  • enforced page breaks: yes, but only when switching page styles (these phantom pages appear only in the “pure” left page/right page sections)

  • no mirrored page style. my left- and right-handed styles are set up independently from one another as separate styles, left followed by right, right followed by left. any other page styles are injected with manual page breaks.

  • yes, indent styles (sub-titles and sub-sub-titles) enforce Keep with next paragraphs (normal text style doesn’t)

  • I sure hope 32 gigs of ram and an i7700K are enough :slight_smile: but LO doesn’t seem to consume too much of the system resources at any given time based on the task manager, even when i have it running for a week.

The best would be to see the document. But if not possible, if you apply a single page style, does it work better (do that in the copy of your document).

Are the tables allowed to span over multiple pages and what are the settings in the paragraph Text flow tab? If all the text is set to Keep with next paragraph, it can cause trouble for example.

  • How are your images anchored? If To page, expect strange things to happen.

  • There is a hint to “multi-column”. How do you implement it? In the page style(s) or inserting sections? In the latter case, I experienced the kind of mishap when mixing tables in multi-column sections.

For best advice, attach a 5-page max sample file exhibiting the mishap. You can attach only to a question. So, edit it and use the paperclip tool.

I had the exact same behavior even before I started working with page styles and just used paragraph styles. some paragraphs (since I never explicitly disabled paragraph splitting) were shifted entirely to the next page with their corresponding sub-title row (that style has Keep-with-next-paragraph persistency enabled) half the time, and “bled” to the next page the other half of the time (which was my intention in the first place). if I closed and opened the document, it was a coin toss how these paragraphs would render. (this was the case while the doc was kept in separate odts for each chapter, so it’s appatently not related directly to file size).

this had just gotten worse once I tried to make the document look “nice” and introduced page styles.

tables are allowed to roll over, yes. (I remember playing with this setting but made no difference.)

I’ll add a dropbox link to my original post in a few minutes along with the answers to Zizi64’s questions, need to get back to my PC.

OP updated, I tried to answer all the leading questions above. Doc link included.

Well, I don’t see anything wrong on my Xubuntu machine. I get 291 pages. No blank page.

Can you upload a screenshot of the issue you do see?

Opened the document using Version: 7.1.2.2 (x64) / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

and I can’t reproduce the problem. The document is 280 pages long; it has the following “empty” pages (obviously they are normal, and not what you describe - so I list them only for completeness, to be on the same page with you): 4 (“CHAPTER PAGE ILLUSTRATION HERE”); 25 (an empty paragraph followed by a manual page break); 26, 52, 93, 99 (“CHAPTER PAGE ILLUSTRATION HERE”); 170 (an empty paragraph followed by a manual page break); 171, 203, 263 (“CHAPTER PAGE ILLUSTRATION HERE”).

This is consistent after reload.

Different page count compared to @Hagar_Delest could indicate missing fonts? (I see some places using TNR)

Well, upon reload, I do see blank pages and empty columns also!

Doc.png

Something strange indeed…

Note that I first counted 287 pages then upon reload it went to 291 (I edited my previous comment thinking that I’d seen wrongly the first time).

The main text seems to be in Liberation Serif, which I do have.

3rd reload, 285 pages, no more blank page/column…

FTR: Opening the file here, and watching the page count in the status bar: it shows 283 initially; after a few seconds, it briefly shows 284, immediately becoming 282, 281, and finally settling to 280 (it takes about 5 s overall). This obviously shows the initial page count read from the ODT (with last rendered page breaks), and then reflects the process of automatic repagination, resulting in stable end result here.

So maybe it makes sense to try 7.1, and see if it makes a difference…

it did! but considering others could reproduce it I feel less crazy now. phew. I’ll dig into the 7.1.X changenotes, this bug has been with me ever since I worked on these docs since like 2008.

I use 7.0. the version 7.1 is no way for me, it loses the cursor last position on opening. Plus a problem with master documents (missing dialog).

@Hagar_Delest: re:the cursor last position - just tested it locally, and it seems to be working. Do you know a number of a bug report, which could help to identify the reproducing situation? (Maybe it’s specific to e.g. 7.1.1 - I tested with 7.1.0 and 7.1.2, or to some characters in name, or locale, or … ?)

@mikekaganski: https://bugs.documentfoundation.org/show_bug.cgi?id=140147

I think it: the left/right Page Styles and the non-breaking objects (images and their anchoring method, tables, large paragraphs) can cause such symptom in the text-flow.

The left/right page style part of a document must be ended with a LEFT page, and the next part must be started with a RIGHT page, but when the length of the text is not enough to fill the “locally last” page, then an empty page will be appeared in the that section.

See it in the two-page View (Book-view) of your document.

There are many un-optimized, huge bit-sized images in your document. A just checked one of them: the attached picture at my answer shows you that the small physical size greyscaled image consupts 4 MiB disk space; and (when it will be loaded and unpacked from the .png archive) consupts 26 MiB memory. And it uses more than 7000 unique “colors”. It is a nonsense. Please optimize your images before you embed them into the document. Use the free IrfanView (or other third party image manager) software to optimize them.

this is a good point that will be done when the book is sent to printing (but unfortunately isn’t the root of the problem). the pics are only embedded for raw edit purposes at this point.

the phantom pages appear just as much with no pictures in the document whatsoever.

edit: at this point it’s unclear what DPI i can get this stuff printed and what color restrictions i’ll need to follow so converting the pictures just because they are high-res has limited RoI at best. i know the odt itself is large, but an exported PDF isn’t, and memory consumption that’s only a few hundred megs shouldn’t be a concern (unless LO has performance and memory leak & management problems with large documents which I’ve not experienced so far).

nonetheless, appreciate the suggestion, it’s on my todo list!

As silly as this sounds, updating to 7.1.2.2 seems to work much better. Closed and opened multiple times, updated the ToC, and no phantom pages. There still is some issue with single-cell tables in a double-column layout, but that’s manageable - I cannot reproduce the randomly inserted empty pages anymore.

I guess I never thought about upgrading because I’ve gone through that with OOo (and later LO) numerous times in 2019 and 2020 and it never seemed to do anything. I’ll really need to check the changelog and probably can find something that’s related.

Thanks @mikekaganski !

Nothing new in the edit, I just fix typos and misspellings.

I have no stray blank pages with 7.0.5.2. I briefly see what @Mike2 Kanganski describes about the initial page number.

However your document formatting exhibits several deficiencies.

Most important You mix styling and direct formatting. You have not thoroughly thought about your styles: the same style is frequently applied onto paragraphs which do not cover the same abstract topic. This is compensated for with direct formatting to slightly change the appearance.

Absolutely no character style is used. Every intra-paragraph variation is applied manually.

No frame style is used to standardize the frame appearance/placement.

Outline

You didn’t use the Header n family. This is a perfectly legitimate decision but it must be consistent. You replaced Header 1 with !E4F_Title_L1 in Tools>Chapter Numbering but none of the others. You left !E4F_Title_L2, !E4F-section_start and !E4F-subsection_start out of it.

In the text, frequently outline level 3 headings are missing: you have the sequence 1-2-4. This is probably a decision of yours related to what should be inserted in the TOC.

You have erroneously styled the TOC title !E4F_Title_L1 in the TOC configuration which certainly disturbs TOC generation because the TOC title is required to be in the TOC itself at level 1while the TOC does not exist yet. You are creating a conflict. Customize Contents Heading itself without assigning it an outline level.

Similarly, some table captions (manually added while others are made with Insert>Caption) are styled !E4F-subsection_start. You don’t see it because you limit your TOC to level 3, but this is wrong.

You even have an empty paragraph as !E4F_Title_L1 (the one on the first page). You are lucky. Writer apparently suppresses empty paragraphs from TOC collection.

You didn’t use the Contents n family for the TOC.

Note that built-in styles can be customized at will. This avoids to redo the full configuration and forget some parameters. This is exemplified by your partial Tools>Numbering reconfiguration even if you don’t number your headings.

Structure

It is uselessly complex. It seems you lose track of what you’ve done.

Your sections (which are justified because you want to have headings on full width and text in 2-column) are nested up to 3 levels.

Taking the example of the very first sections: Section56 (2-column) is nested in Section6 which has no other content than Section56. Section6 could be removed altogether: it does not change the formatting but simplifies the structure which is beneficial for stability.

The same goes for Section4 which has dozens of nested sections. And so on …

Remember that the lighter the structure, the better the performance and reliability.

Similarly, numerous tables (those with a single column) could be replaced by an adequate style with the required border. Writer can merge borders of consecutive paragraphs of same style. This could avoid possible weird table splits and associated formatting issues.

Nearly all your page breaks are manual. Most could be transferred into the style Text Flow tab, e.g. !E4F_Title_L1. But you are not consistent about your level 2. This could be fixed with a Keep with next paragraph setting and a larger spacing above and below.

##Randomly inserted blank page

After playing with your file and testing structure simplication, I cause a blank page to appear between pages 21 and 22 (but this may not be the same as yours because I have not the same fonts and I already modified a bit the structure).

From my experience, this is a common “glitch” caused by interactions between sections and tables in complex structure documents (and yours is really uselessly complex).

The “culprit” is the “Object Durability” table. You allowed the table and its rows to split across pages and columns. It got the heading row at the bottom of a page, a blank page and table content at start of next page, followed by the rest of the document.

It appears this table has a semantic heading row plus content rows. Table is split by text flow which cuts it anywhere. If you request to repeat the heading row, text flow is informed about the table semantics and the table heading is shifted on next page instead of being left alone. The remaining space of the preceding page is roughly one line which is usual.

It would seem silly to request heading repetition on such small tables but you never know what text flow will do. Therefore give it maximum information about your tables so that it can react accordingly.

I think that configuring all your tables like this will fix the majority of your spurious blank pages.

##Summary

On such a long document, avoid direct formatting. Style your document (not only paragraph styles but also character, frame and pages – I didn’t check your page styles)

Review your paragraph style collection to make it more consistent and more specific: one semantic meaning => one paragraph style; don’t use the same for different significances, you’ll want to fix with direct formatting (and this always causes problems).

Simplify your section nestings.

Add heading information in your table properties.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

thanks - this is extremely helpful.
i wasn’t even aware of the “Sections” feature until somebody recommended that for a practical issue i had a few months back, so it will need some time to interpret and understand that part of your response. the rest is noted - thanks for the suggestions, i’ll spend time with that over the weekend!