Delete blank page after table

Discuss the word processor
Post Reply
Atheist
Posts: 1
Joined: Tue Apr 23, 2024 4:00 am

Delete blank page after table

Post by Atheist »

See that other page?.....
I can not get rid of it.
There are no characters on it or anything else, for that matter.
OOO Page to erase 1.png
OOO Page to erase 1.png (82.33 KiB) Viewed 739 times
 Edit: Changed subject, was Delete blank pages 
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Last edited by MrProgrammer on Tue Apr 23, 2024 3:48 pm, edited 1 time in total.
OpenOffice 3.1 on Windows
FJCC
Moderator
Posts: 9288
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Delete blank pages

Post by FJCC »

Can you upload the actual document?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
Posts: 9288
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Delete blank pages

Post by FJCC »

If you select the menu View -> Nonprinting Characters, do you see an empty paragraph on the second page?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Hagar Delest
Moderator
Posts: 32683
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Delete blank pages

Post by Hagar Delest »

Set the blank paragraph below the table to font size 2 (the minimum).
Or set the font properties of that blank paragraph to hidden to hide it completely.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34622
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Delete blank pages

Post by RoryOF »

To expand on what Hagar has said: in OpenOffice, a Table is _always_ followed by an empty paragraph; this one can see by turning on /View /Non printing characters. One cannot remove that empty paragraph, but one can select it and reduce it to 2 pts, which is the minimum. One may be able to reduce the content on the first page by sufficient to make room for that blank paragraph or by adjusting top or bottom margins by a miniscule amount, in which case your blank page ought vanish.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
JeJe
Volunteer
Posts: 2791
Joined: Wed Mar 09, 2016 2:40 pm

Re: Delete blank pages

Post by JeJe »

You can remove the paragraph after the last table with this macro:

Code: Select all

Sub RemoveLastParagraph
txt = thiscomponent.text
tc =txt.createtextcursorbyrange(txt.end)
tc.createenumeration.nextelement.dispose
End Sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
MrProgrammer
Moderator
Posts: 4913
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Delete blank page after table

Post by MrProgrammer »

JeJe wrote: Tue Apr 23, 2024 1:11 pm
Sub RemoveLastParagraph
txt = thiscomponent.text
tc =txt.createtextcursorbyrange(txt.end)
tc.createenumeration.nextelement.dispose
End Sub
2016 topic [Solved] Undeletable page when filling whole page with table suggests that the page which the macro deletes will return if the document is saved and reopened. A test with OpenOffice 4.1.7 confirms that behavior. OpenOffice adds a paragraph to hold the table when the document is opened, so the unwanted page will return. Either use Format → Character → Font → Size → 2 or Format → Character → Font Effects → Hidden. If the unwanted page is only a problem when printing, just tell your printer driver not to print it.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
JeJe
Volunteer
Posts: 2791
Joined: Wed Mar 09, 2016 2:40 pm

Re: Delete blank page after table

Post by JeJe »

You're right, the paragraph is reinserted on reopening. A workaround would be run the macro on document load but that's getting complicated.

Another method would be put the contents of the page into a text frame, and turn the frame autosize off. You can size the frame to the bottom edge of the table so the paragraph after it isn't visible.

But format/character/hidden is the best/simplest IMO.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
JeJe
Volunteer
Posts: 2791
Joined: Wed Mar 09, 2016 2:40 pm

Re: Delete blank page after table

Post by JeJe »

A variation of the hidden text would be to insert menu/fields/Other/Functions tab/Hidden paragraph with a condition that isn't met. The paragraph can be toggled with view menu/hidden paragraphs.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply