Page 1 of 1

[Solved] Can't get rid of blank page at end of doc

Posted: Thu Feb 26, 2009 11:56 pm
by dkerber
While I was trying to import text boxes from another doc into my current one, I somehow ended up with a blank page at the end, that I cannot get rid of. I have it set to view everything possible on the view menu, and there's nothing on that last page, but I can't get rid of it. I've tried several things: Ctrl-End to move my cursor to the bottom of the doc, and then hitting backspace; placing my cursor after the last real stuff in the doc and holding down delete; clicking in the middle of the page and doing both delete and backspace. Nothing gets rid of that junk page.

Almost forgot: OOO v3.0.1 on Win XP.

Any suggestions as to what happened, and how to fix it?
Thanks!
D

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 12:03 am
by Hagar Delest
Try that one: Can't Delete Page Break! Else, can you upload your file (see here: How to attach a document here)?

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 12:17 am
by dkerber
That reference didn't do the trick; my ghost page insists on always being the last page, so there's no next paragraph to check (and I did try to put one in!). Checking paragraph text flow settings immediately before it didn't show anything interesting either. So here's the doc, cleaned up a bit to have just the last desired page, plus the ghost one.

Thanks for the help!
D

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 12:51 am
by Hagar Delest
Indeed, I can't remove it neither. I've seen that once but can't find what was the fix. Something I've not tried yet: copy the file, rename it as .zip, delete the styles.xml file inside and change the extension back to .odt and see what happens. You can also try to delete in the content.xml file the part between the <automatic-styles> tags.

Good luck!

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 1:21 am
by TheGurkha
Not sure what is happening here, but if you Save As a .doc and then open that, the second page has some content in it.

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 4:28 am
by acknak
This is one strange document.

Here's what I see:
ghost_page.png
But only when I have View > Nonprinting characters: ON

This is because all the stuff on the second page is anchored to a single space character at the top of the page. That paragraph has a page break which forces a new page, but the character is hidden, so it, and everything that's anchored to it, are all invisible unless you turn on nonprinting characters.

It seems strange that everything on the second page is invisible, yet the page break is still honored.

The diagonal arrow on the second page is strange, too. There are multiple overlapping copies and their height (Format > Object > Position & Size) is 99 inches.

Try the version I've attached. All I did was make the space character not hidden.

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 9:58 am
by Hagar Delest
Well done. That's strange, on my xubuntu box even with the non printing characters displayed I couldn't see the content of the second page. I knew there was something since some of the items were grayed out in the Navigator. Will have to check again this evening.
 Edit: OK, I had unchecked the display of hidden text in the Tools>Options>Writer settings :roll: 

Re: Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 3:36 pm
by dkerber
Thanks for the comments, people! Merging the various suggestions, I ended up going into the raw content.xml with a text editor and deleted what appeared to be the problematic text block (search for <text:p text:style-name="P52">, IIRC), and then the doc looked ok after saving it back.

I'll leave the demo doc up so others can play with it; maybe it will help the developers with making a more robust layout engine. If there was something like wordperfect's "reveal codes" functionality available which displayed the raw xml and its associated section of the display, it might have made this possible to fix from OOO itself, but a bit of searching seemed to indicate that this functionality is tough to implement, and doesn't yet exist.

Thanks for the help!

Re: [Solved] Can't get rid of blank page at end of doc

Posted: Fri Feb 27, 2009 5:27 pm
by Hagar Delest
You can ask for the reveal code feature, it has been filed in the Issue Tracker.