How to Bring PDF Logical Page Numbers into Correspondence with Document Page Numbers

The intended audience of this post is those who are very familiar with the use of the Unix command line. Knowledge of the PostScript and/or PDF formats is useful but unnecessary. I hope to write software to make this task easier for those without the aforementioned knowledge. One problem that plagues those who often read PDFs scanned from physical documents—and even those who read some…