Writer: page numbers vs "page number on printed document"

I’m working on a long document on Writer that includes copy-and-pasted text from several other documents. When I try to insert page numbers in the header, they only insert on a few pages and then stop. When I insert for the next section, the page numbering restarts. This pattern follows the page numbers of the original documents the text comes from, and the distinction in the page/word count preview in the bottom-left-hand corner between “Page number in document” and “Page number in printed document”. Is there any way to turn this feature off and integrate the whole thing as one document so I get consistent page numbers? Or will I have to do all the page numbers manually?

Using on a Macbook Air running El Capitan if that makes a difference.

You have copied the page numbering settings as well, so you need to get rid of them. Page numbering can be set to start from 1 in the first paragraph on a page. So, navigate to the first page where the numbering restarts, put the cursor in the first paragraph and select Format - Paragraph, Text Flow tab (if the numbering restarts with every chapter, it may be a setting in the heading paragraph style, and then you should change that). Change the Page number to 0. You can undo an unwanted page style change at the same time (remove the tick mark in With page style). Repeat until end of document.

Next thing to do is check the page styles in the document. If you headers and/or footers suddenly disappear, you got a page style break. Page style breaks can also be set in the first paragraph of a page (and will be if you copy/pasted your text), and you can remove any unwanted page style changes on the same tab of the paragraph style dialog box where you reset the page numbering.