Place mouse pointer over next page button, so it clicks each time.
Lauch my Autokey script via Home button.
Enter number of pages.
See how it does it.
Open screenshots directory in XnView, select them. Locate it’s BatchConvert tool, in Actions tab select a crop action and adjust it to pages’ margins. ACHTUNG The last one should be done differently, you can open it in XnV and crop this one alone.
Use any tool to stitch them back together into a PDF. I’ve used PDF Arranger: github.com/pdfarranger/pdfarranger But some user down there said it crashed on 600-something pages document.