Cookie

LibreOffice Writer: number each page

Published by TheJoe on

Estimated reading time: 4 minutes

Caution


This article was published more than a year ago, there may have been developments.
Please take this into account.

In today's article you will see how to insert the current page number on all pages in a LibreOffice Writer document. We will use LibreOffice 7.0.3.

In the first example you will set the same position on all pages, whether they are right or left. In the second example, the page number will be aligned to the right or left depending on whether the page is odd or even (useful function if you want to print a “book” with central binding).

Alignment of the page number always the same

Entering the page number is a fairly simple operation: “Enter” – “Command field” – “Page number“.

In the same menu you will find several items including “Page count“, “Data“, “Headline“, “Author“. Entering this information on the page can help you, but it may be more useful to repeat the information on all pages of a document… maybe automatically.

To repeat the same information dynamically on all pages (eg “Page 43 of 100“) we will have to activate the function “Footer“.

By activating the footer you will create a separate sheet section, at bottom of page. The content of the footer will be repeated on all sheets of the document. The same thing happens by activating the Header line, with the difference that the repeated zone will be at the top of the sheet and not at the bottom.

In the following example I added a random text and set the footer to show the page number, the total number of pages that make up the document, the title of the work, the time and date of the print launch (or export). The position of the elements is easily determined with the tabulation (by default the first element is left aligned, the second is centered and the last is on the right).

Look here:  Some javascript resources

The gray background of the dynamic elements is used in the modification phase to recognize the parts – note – dynamics of the document. Gray backgrounds will then not be printed or exported to PDF.

To enter these different elements you will need to select “Enter” – “Field commands” – “Other fields” (or the shortcut Ctrl+F2).

Different page number alignment for odd or even pages

In this second, quick example you will learn how to align the current page number to the right or left by alternating pages. When you rebind the printed document, you can have the current page number in the outer corner of all pages on all sides (farthest from the binding).

First we open the menu “Page style”. In LibreOffice, there are several ways to get to opening this window, I'm used to using the “navigator“. Awards F11 activating the styles window, click on the icon “Page styles“, right click on “Default page style” and finally on “Change“.

The window will open “Page style: Default page style”. In the tab “Footer” you will have to uncheck a “Equal content on left and right pages“.

To align each page number to its corresponding position you will need to modify the footer of the first two pages by aligning the number to the right in the first and left in the second (or vice versa depending on the page number with which you will start printing).

If you get to the bottom of the draft you realize that you have reversed the alignment, just change the footer of the first two pages, it will be changed throughout the document.


TheJoe

I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.

4 Comments

sandro · 26 November 2024 at 2:02 PM

I do exactly the steps you say… I tried both in the header and footer. I've tried every possible way but the text always appears instead of the number.

    TheJoe · 28 November 2024 at 9:03 AM

    I follow the tutorial to the letter and I get the result even on recent versions.

    You can post a video screen where I can see the actual steps?

TheJoe · 26 November 2024 at 12:51 PM

You actually have to click on “page number” dal menu “insert” – “field command”. Tell me the steps that lead you to that error.

sandro · 25 November 2024 at 5:28 PM

I follow what is written here to the letter, to insert page numbers. But instead of the number he inserts the writing “Page number”. What am I doing wrong?

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.