Page 1 of 1

[Python] [Writer] Remove empty pages?

Posted: Thu Apr 22, 2021 11:49 pm
by yijinger
Hello,

I compiled my document and found some empty pages. How can I look through each page and remove empty ones? I could not find anything useful for my case.

Re: [Python][Writer] Remove empty pages?

Posted: Fri Apr 23, 2021 12:04 am
by JeJe
What do you mean by 'empty page'... a page of blank paragraphs or unwanted manual page breaks?

Re: [Python][Writer] Remove empty pages?

Posted: Fri Apr 23, 2021 5:39 am
by yijinger
Blank pages appeared due to paragraph breaks - the last element on the previous page inserts "PARAGRAPH_BREAK", and it adds another page, which does not fill. But if I insert a condition concerning this paragraph break, I observe bugs with the previous paragraph.

Re: [Python][Writer] Remove empty pages?

Posted: Tue May 18, 2021 3:35 pm
by Bidouille
In theory, any printer driver is able to ignore blank pages.

Re: [Python] [Writer] Remove empty pages?

Posted: Tue May 18, 2021 7:24 pm
by yijinger
But my document is not for printing. The problem still not solved.

Re: [Python] [Writer] Remove empty pages?

Posted: Tue May 18, 2021 7:29 pm
by RoryOF
Look at your document in OpenOffice; turn on /View /Non printing Characters, and decide why there are blank pages. It is your document - you can see it, we can't.

Re: [Python] [Writer] Remove empty pages?

Posted: Wed May 19, 2021 7:48 pm
by yijinger
Sorry, but I don't see any reason to make this problem personal. I'd like to see a pure solution: you get a document from somewhere and you have to remove blank pages from it. The problem looks simple in this wording, but how simple the solution is?

Re: [Python] [Writer] Remove empty pages?

Posted: Wed May 19, 2021 8:00 pm
by RoryOF
You still see a document that we cannot see. We can only guess what you are seeing and what you have done. You want a solution? Then give us a sample document.

This is like sending one's daughter to doctor to say her father (you) has a pain here(^); Doctor can only guess.

Re: [Python][Writer] Remove empty pages?

Posted: Thu May 20, 2021 8:12 am
by Hagar Delest
I guess that you've to detail a bit this part:
yijinger wrote:Blank pages appeared due to paragraph breaks - the last element on the previous page inserts "PARAGRAPH_BREAK", and it adds another page, which does not fill. But if I insert a condition concerning this paragraph break, I observe bugs with the previous paragraph.
I understand you add a paragraph break to prevent a bug. Fixing that bug in the previous paragraph may eliminate the need of the paragraph break and thus the blank page.