How to insert page numbers into PDF?

I am formatting and compiling a large book. I need page numbers in the bottom or top corners of each page, mirrored (so that pages on right page are on right side, left page left side). I’ve been struggling to get this to work, formatted how I wish, in a simple odt, never mind the large book which I am compiling.

Due to limitations in LO Writer endnote functionality (unable to separate endnotes per section AND list them all at end of document under appropriate headings), I have no choice but to export each chapter as a PDF separately, and then bring it all together it in a PDF arranger, extracting the endnote pages from each chapter to be inserted at the end of the book, with headings added via Libre Draw.

Therefore it seems my best option for page numbers is to apply it after the macro PDF is compiled. Three possible methods include:

  1. Insert page numbers in odt files which correspond to page counts in macro PDF. Then re-export and re-compile.
  2. Open macro PDF in Libre Draw and insert page numbers.
  3. Insert numbers in a more suitable software.
  • Issues:
  1. I don’t know how to insert the page numbers (a) starting at values I want (b) presented in mirror form (c) with completely separate number for endnote page (d) formatted in the font/size I wish.

  2. Same as 1., plus Libre Draw breaks the formatting of my book - in particular my text loses it’s justified alignment.

  3. Seems like a far better method, but I don’t know any software which can help me?

Provide a better description of what you want to achieve. Mention number of chapters (to determine the number of sections needed).
What do you mean by “endnotes per section AND list them all at end of document under appropriate headings” ? Do you want the endnotes twice, once at end of chapters and once at end of book?

Or is your problem a difficulty to insert note headings? This is easy to do by creating a fake unnumbered endnote attached to the chapter heading.

Inserting page numbers on outer edge of sheet is handled by built-in means.

With a better specification of your goal, it is likely a fourth method will do the job bully automatic inside Writer.

The main goal I want to achieve which I don’t think is achievable through Libre Writer is resetting the endnote numbering per chapter, and placing the list of all endnotes at the end of the book.

Effectively, you can’t restart endnote number per chapter. It is perhaps a consequence of the fact that developers didn’t imagine how to insert non-note text among the notes to be used as separators (your “note headings”) and notes are listed continuously, thus not clearly showing the limits of chapters. Though, this can be done as I mentioned: you create an unnumbered note attached to the chapter heading (e.g. using a field to repeat heading contents). You apply to this note a paragraph style of your choice to format it like a heading (instead of default Endnote) and you’re done. The only impossible thing is to insert a page break among the notes.

Here is an example: EndnotesWithHeadings.odt (33.5 KB)

Unfortunately I need page breaks in my book and reset numbering otherwise endnotes will be in triple figures. I didn’t mean to divert the discussion to the endnote issue which I already researched in-depth. There are further reasons why I’m compiling my book in this way (avoiding one single large doc and use of macro docs).

I’m hoping to find a solution to my page numbering issue.

Acrobat is the only PDF editor that I have used that doesn’t break some functionality of an exported pdf.

Better I think to do the complete document in Writer and export the finished document from there.

There are two ways to do this, assume we want the number in the footers and we are starting with a blank document:

  1. Different Footer/Header
    Unless you have set a default template you will have Default Page Style. Right click on the page style in the page styles pane and select Edit style (Modify for older versions). Click the Footer tab, tick the box Footer on and untick Same content for left and right pages, OK.
    1. You want the page number to be on the outside edge so click in the footer and press Tab twice to bring the cursor to the right edge. Click Insert > Field > Page number
    2. Click in the body of the document and press Ctrl+Enter to create a new page or add enough text to create a new page. Click in the footer of that page. The cursor will be on the left which is the outside edge so click Insert > Field > Page number
  2. Right page/Left Page
    With a blank document open, in the styles pane double click Right Page to apply the style to your page.
    1. Right click Right Page style and select Edit style. In the Footer tab tick Footer on, OK. Click in the footer and press Tab twice to bring the cursor to the right edge. Click Insert > Field > Page number
    2. Right click Left Page style and select Edit style. In the Footer tab tick Footer on, OK. Click in the body of the document and press Ctrl+Enter to insert a new page or add enough text to create a new page. Click in the footer, the cursor will be on the left which is the outside edge so click Insert > Field > Page number

See this question, Page numbers starting at page 5. No page numbers for Title, Copywrite, etc - #2 by EarnestAl

Change the font size in Paragraph styles, either Header and Footer or just Footer if you have other plans for Header.

probably need a bit of automation (i.e scrpiting) → PDFtk - The PDF Toolkit