This pair of userscripts (to be used with any usescript manager such as ViolentMonkey) allow scraping books from the VitalSource Bookshelf web reader.
This allows creating a PDF for offline reading with free-software readers such as Calibre.
The "inner" script hooks into the book page nested iframe; it detects when a new page image is loaded and it automatically starts a browser download.
The "outer" script hooks into the main reader page and adds a "Scrape" button which automatically goes to the next page when the inner script has successfully downloaded a page.