Recently, I had to buy some books for school and the books were available as e-books. Unfortunately, the e-books are only accessible with the Edubase Reader. This motivated me to write an app that converts the Edubase SVG solution into a searchable PDF.
I wrote this script in the evening, and it was not meant to be on GitHub, but after I finished, I decided to upload it anyway. So, the instructions and the code are loose. Maybe I will rewrite the whole script at some point, but not today.
If you got some questions. Please have no hesitation to create an issue and linking me.
- Login to your account and open the book you want to convert.
- Navigate to the first page.
- Open the development menu, so you can access the console. (F12 on Windows)
- Set the variable
maxPages
to the maximum number of pages your desired book has. - Paste the whole code into the console.
- The script should start downloading numerous files, so maybe you have to grant special permissions (Tested on Google Chrome).
- Install the dependencies with
yarn
. - Set the variable
numberOfPages
insideindex.js
to the maximum number of pages your desired book has. - Set the property
url
insideindex.js
to the path your downloaded HTML files are available, and include thepage
variable.Page.navigate({ url: `file:///C:/Users/iamcool/Downloads/pages/page-${page}.html`, });
- Run the script with
$ node .
and wait for the script to finish. - When everything is done, each page should be in a separate file inside your
pages
directory. - Combine the files with any program you like. (I used Adobe Acrobat Reader.)
- Let the app scan the PDF and detect texts. (I used Adobe Acrobat Reader.)
PS: The image was made with MS Paint.