Below is an explanation of how this can be avoided.
Once you've created your pages, probably from a template, you would probably go to the 'Numbering and Section Options' on the page menu to paginate the document. The little black arrow above the page icon shows that this page holds a section start. See below:

If you have more than one section start in a single document, it confuses the page numbers when creating the PDF.
For any section start, other than the first, the Numbering and Section Options menu looks like the following:

By comparison, below is the same menu with a single section start:

If your document contains only one section start, but the box is not greyed out, you need to uncheck the 'Start Section' tickbox - then press ok - then reopen the 'Numbering and Section Options' window for the first page, and re-enter the start page number. The 'Start Section' option should now be greyed out. The document should now upload fine.
You can also see if the document is going to upload correctly if all the page numbers are shown on the bottom-bar like this:
And you can tell it will cause problems if something like this appears anywhere in your document: