how to remove page number from the last page in writer document

I need to remove the page number only from the last page of a writer document.

Can you help me please. Thank you :slight_smile:


1 Like

This can be done if the last has some outstanding property against other pages. If this just the last page of the document, no chance. What is in your last page? Is there a special formatting for the content?

Provide this information with the edit link, not with an answer

  • shortcut CTRL + F2 (insert fields)
  • Document > Type Page :: Select Next Page :: Format As Page Style :: Offset -1

Page number is shown in the right way. Last page: Next page is not shown because of not existing.
(found here → German wiki archive of OpenOffice)

Be advised that fields don’t properly feed a TOC. - Cheers


This SOLVED also my first question. Thanks a lot!
What if I have a ramdom text in the header I don’t like to see onto my last page?

@ timeless: That’s another question. Please start a new topic about that.

What you should do is create separate page style for only that last page. Click on page style you currently use for your document and go Right Click → New. You want new page style to inherent all formatting from style you currently use. Different page styles get to have different header and footer content. Get cursor to one page before last and do InsertManual break… → [type] Page break → [style] choose style you just created.

Now you should have be able to make last page not having page number.

Yes, but what is the “last” page? If it’s only the consequence of text flow, adding a manual break will not give the expected result if text before the break is edited (may result in an orphan line on the before-last page). This is why I asked about the nature of the last page: a TOC, an index, a back cover? In fact anything but flowing text. We can then identify the beginning of the last page by a specific heading (title) and apply a page break to this paragraph style to switch to the special last-page page style.

At least it worked for me. Thanks @Kruno ! I am just a random Internet user with the same problem. I wanted to show page numbers 1 to 7 but not on page 8 to 10 in a 10 page document.

Thank you so much to everyone for your answers. I’ve followed your advise and my problem is now resolved.
My last doc page is in a way “irrelevant” to the previous text, but needs to be there just the same.

All is good now. THANK YOU AGAIN :-)))))))

Then, if the last page is semantically different from the preceding, I’d recommend adding a manual break to a new page style. The page style will be identical to the one used for the main text (likely to be Default Style) but for the footer or header left blank.

This avoids fiddling with Offset property. Offset is meant only for forward/backward references (like “see next page x” or “see 5 pages before at y”) which are returned blank is the page does not exist. Using it for offsetting the running page number is a bad practice as advised in several questions on this site.

ODF has a direct solution to this question:

19.869 text:select-page

19.869.3 <text:page-number>

Note: To display the current page number on all pages except the first or last page, use a combination of the text:select-page and text:page-adjust attributes.

I.e., insert a “Next page” field (Insert|Field|More Fields Ctrl+F2, Document tab, Page number (unstyled) type), make sure its format is set “As Page Style”, and set its offset to -1. This field will show on all pages except the last.

(Related: tdf#149480 - meaning that there may be issues when the page numbering is not contiguous, which should be resolved eventually.)


@mikekaganski: wow, very tricky! But average user will not understand how and why it works.

Oh now I see it’s already explained by @Grantler - so my answer is just adding the ODF bits.

I apologise to @Grantler for not having analysed in depth his solution. The idea behind it is very brilliant.