Inconsistent rendering, randomly inserted empty pages

[Edit - OP further down]

Full doc: https://www.dropbox.com/s/sk8c3sd03o0h5n1/[Combined]E4F.odt?dl=0

Supporting questions asked:

Which file type are you using? .odt? .doc, .docx, or other?
odt

How many graphical objects are in your document (images, tables, etc…)?
abt. 40 images and ~100 tables (some are just a single cell for formatting purposes, but half are proper full-blown tables)

Do you use more than one different Page Styles in your document?
About a dozen page styles (left page, right page, and “chapter start” style for each chapter due to the different full-page illustration)

Are there enforced Page Breaks?
Yes, but only when switching page styles (these phantom pages appear only in the “pure” left page/right page sections)

Do you use Mirrored Page style in your document?
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.

Are there some enforced “Keep with next paragraphs” option in the paragraph styles?
Yes, indent styles (sub-titles and sub-sub-titles) enforce Keep with next paragraphs (normal text style doesn’t)

Has your PC enough system memory and enough processor capacity for the “continous re-rendering”?
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.

If you apply a single page style, does it work better (do that in the copy of your document).
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.

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.
tables are allowed to roll over, yes. (I remember playing with this setting but made no difference.)

How are your images anchored? If To page, expect strange things to happen.
I learnt this the hard way when I first tried to use an odm. Pictures are all anchored to a paragraph except for the frame/background pictures which are set up as a stretched Page Style background.

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.
Columns are set manually where I needed them, some tables use full page width. They aren’t part of the page style and couldn’t get Sections work (there’s numerous parts of the document where I have a single column section with a table and a two-column section following). I’ve seen this “table bleeding” happen no matter how many columns I used, but it happens more frequently when I use a single column.

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 would love to do this, but I cannot. Reasons are:

  1. This behavior is totally ad hoc and could not figure out how to “force” it to happen. If I could, I would be closer to the resolution I guess :slight_smile:
  2. If I just copy and paste these sections in a small, separate document, it doesn’t seem to happen reliably
  3. Even when I see this happen when I open the document, the next time I open it it may or may not happen in the exact same spot.

Case in point, the most recent PDF export is 278 pages. When I opened the doc from Dropbox just now, it’s 289 pages. I see five empty pages inserted between page 180 and 186.

I closed the doc (without doing anything, or saving), and opened again. it’s now 283 pages. This means 6 phantom pages disappeared; I see the five empty pages between p. 180 and 186 and after scrolling through the whole document, it now shows 285 pages, breaking two columned sections further down past page 270.

Closed and opened the doc again. It’s again 283 pages, but the phantom pages between the “original” p. 180 and 186 are now gone. They are now however page 184 and 185 so there must be something else broken earlier in the document that I couldn’t spot at first glimpse at max zoom-out.

[Original post]
Running LO 7.0.4.2 on Windows 10.

I had this extremely annoying issue in OOo and hoped LO would be better in this respect; unfortunately not.

Here’s the use case. I have a 277 pages long document with numerous styles to keep it nice and dandy. Or is it 283 pages? 298? 279?

Every single time I open the document, it inserts random empty pages (retaining the page style that should apply, so these aren’t “big blank pages”). Tables get shifted across multiple pages (keeping only the table header on each page, otherwise these extra pages are empty). Paragraphs (not even a paragraph break, it’s the same paragraph!) get split between two pages with 3, 5, sometimes 15 empty pages inserted in-between.

If I scroll through the document and highlight the pieces of text or table row that are before these phantom pages, they disappear in most cases as the section gets re-rendered; other times I need to insert and delete a random letter in the paragraph.

Anyway, let’s say I did all this as part of my “preparation to export to PDF” step, and now all the empty pages are gone, all good. Right?

Unfortunately I have a ToC at the start of the document. If I refresh that to update the page numbers, the same nondetermenistic amount of random empty pages get inserted all across the doc, again. (And the ToC page numbers reflect the page numbers with the phantom pages factored in.) The only thing I can do is go through the “empty page cleanup process” again, refresh the ToC, and if there’s only two or three empty pages inserted close to the end of the doc, swallow the pill, remove the blank pages again, and export with an incorrect ToC. (This means I’m weeding out these empty pages multiple times before I get an “ok-ish”, but still not “perfect” result.)

I tried using a master document thinking this is related to the size of the individual document. it behaves the exact same way but without any easy workaround to fix it (but it often breaks the two-column layout and just pushes the second column to a separate page, spreading an otherwise 15-page chapter across 30 pages - layouts that seem to work perfectly otherwise).

(Actually, my struggle with the master document approach for 4 months was the final push I needed to migrate over to LO, but it’s just as unpredictable in LO as it was in OOo. That was the point I just merged the whole collection of chapters into a single doc. It all seemed fine… until I opened the saved document the first time.)

I really, really need some help here. The obvious answer would be using a dedicated publishing software instead, but migrating the doc from OOo to LO was already a multi-day effort due to the small differences that I needed to play whack-a-mole with. If I would need to rebuild the doc in a brand new app, I’d probably lose my mind - but this rendering issue put me on that track already.

I did searches throughout the past months and I couldn’t find anyone with this issue, which suggests it’s probably I screwing up my page setup, but it doesn’t make it any less frustrating. :frowning: Apologies if I sound bitter or harsh but realizing how much time migrating to a publishing software would take was the last drop in my bucket of misery.

There are some questions:

  • Which file type are you asung? .odt? .doc, .docx, or other?
  • How many graphical objects are in your document (images, tables, etc…)?
  • Do you use more than one different Page Styles in your document?
  • Are there enforced Page Breaks?
  • Do you use Mirrored Page style in your document?
  • Are there some enforced “Keep with next paragraphs” option in the paragraph styles?
  • Has your PC enough system memory and enough processor capacity for the “continous re-rendering”?

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 !