Why are the page numbers at the end of the document missing?

Hi there!
When I want to start page number at a specific digit, say “5”, I use “offset” option froom
Insert > Fields > Other > Page number > Offset
and put “4” there, this way my document starts with the number “5” and on, this is cool!

But the problem is when I reach at the last 4 pages of the document, well, they don’t have page numbers. I always have to manually put page numbers again.

So my question is:
What i am doing for what i want to do, is right? or there is another way?
Why the last 4 pages don’t have page numbers?
Thanks!
Regards!
Ata Rafi

The problem is the offset. This is bug tdf#35694, which as indicated in comment 29 is in keeping with the ODF v1.2 specification:

19.845.2 text:page-number
The text:page-adjust attribute specifies an adjustment of the value of a page number field, in order to display of page numbers of following or preceding pages. The specified value is added to the current page number. If a page with the resulting page number does not exist, no number is displayed.

In other words, once the fifth last page is reached, there effectively is no further pages in the document for LO to enumerate, because the offset is counting X pages ahead. Perhaps approach the problem differently by using the instructions on this help page (thanks to @mahfiaz for the link in the comment below).

@oweng, hey, check this wiki page out :slight_smile:
https://help.libreoffice.org/Writer/Page_Numbers#To_Start_With_a_Defined_Page_Number

@mahfiaz, thanks. I will update my answer. I need to start making greater use of the help pages.

Thanks @oweng
Thanks @Mahfiaz
this trick worked for me.
thank you.

The problem could be the 2nd page of your document.
I have first page and second page formated as default and checked even “same as first page” for footer. However, I always need to insert page number in the footer of the first page and second page of the document. Thereafter all is correct. The same is valid when I use an off-set.
To me this seems to be a bug but I had no time to report it. If you have the same problem please feel free to report the bug at: https://www.libreoffice.org/get-help/bug/

I am using LibO 4.1.5.3 on XP.