digi4offline

Digi4school is an Austrian platform for digital school textbooks. Students activate books tied to their account and read them in the browser, but there is no official way to save them for offline use. During my time at HTL I got tired of needing an internet connection just to study, so I wrote a small Node.js command line tool that downloads any activated book and saves it as a PDF.

The tool is published on npm and can be installed via npm install -g digi4offline. The source is on GitHub.

How It Works

After authenticating with your digi4school credentials the tool fetches the pages of the requested book in parallel, with configurable concurrency and retry counts for both page and image requests. Pages are then assembled into a PDF and written to the output path. The book id comes straight from the URL of an open book in the browser, so finding the right one takes no effort at all.

Page ranges are supported, so you can download a single chapter instead of an entire book. Ranges can be specified by index or by the printed page labels if those differ, which they often do when a book has a preface or an index section with separate numbering.