Page numbers don't match in PDF export

I have a book I wrote in Writer and used the indexing feature to create the page numbers and table of contents. Everything is correct in the writer file, page numbers are at the bottom and correct. When I export it to PDF in the document it’s self, everything is still correct: the toc is correct, and the page numbers at the bottom of the pages are correct, but the PDF overview is off by a few pages because the title page, copyright, and toc are not counted in the actual document as pages but the PDF counts them. How do I get the first few pages skipped or assigned a Roman numeral so the PDF outline shows the correct page numbers?

I use Rocky Linux, so it’s the Linux 7.1.8.1 version.

Thanks!

By any chance, have you forced an offset on the page number?

Do you use styles to format your book?

Do you know about page styles and their usage to lay out differently (header, paging, margins, …) parts of a document? In your case you need a page style for the cover page (and eventually unnumbered subsequent pages), a page style for Roman-numbered TOC and a page style for the chapters.

Yes, to an extent. I am new to using styles, and I did use page styles, and that is how I got the numbering reset to 1 for my first page and how I got the header and footers to show correctly. I found somewhere how to start a document with Roman numerals, but in my case the document already exists, so I am unsure how to change the style for the first pages or how to set them as unnumbered so it generates the PDF correctly. If they need a number of some sort for the PDF then I would need to use Roman numerals, if I can just set them as “unnumbered,” that would be best, but I am not sure if a PDF can have pages without numbers. Thanks!

A PDF will show what is in the original document (PDF is a display format, not a “formatting” one).

You have no other solution than adding page styles if there are none in the existing document. You switch from one page style to the other with a “special” Insert>More Breaks>Manual Break (not sure about wording in 7.1.8.1 as this is one area where it is different from current 24.8) which allows you to designate the page style to activate after the break.

I asked about page offset because it is a misunderstood concept, a faux-ami, not providing what you instinctively expect. Don’t use page offset until you fully understand it does not change the page number but references another page.

Review your style set. When you want a sophisticated layout, designing a consistent style set is critical for success.

Thank you for your reply. I did find where to change the page number to i, ii, etc., for the style of the first pages, and I confirmed by adding the page number field that it is numbering them that way. However, my PDF reader still counts from the first physical page and does not use the i, ii, etc… Oh well, the actual document is correct, so I guess I will not worry about it. The headings appear in the reader correctly, and when you select them, they go to the correct place. It’s just that the page numbers in the reader are incorrect from what the page text says at the bottom, but the page number at the bottom corresponds to the toc in the book. I was not sure if there was a setting in the PDF export that would correct that; maybe it’s just the reader I am using.

I think it is PDF reader issue, it doesn’t look at page numbers, just the number of total pages and which of those pages it is displaying, counted from the beginning.
If the TOC works correctly and the page numbers match those in the TOC then that is all you can do.

This question also deals with a pdf reader overriding the document settings, Couleur de fond des champs de saisie d’un formulaire . The problem is that you cannot change it for anyone else, nor for other pdf readers.

I suppose you could post a bug report with your pdf reader…