I bought an e-book in the Amazon Store, the son wanted a copy. I didn’t really want to mess with DRM, so I had an idea to take a screenshot of each page. At first I thought about turning over and making a copy of the screen - as a result, a small shell script appeared:
for i in `seq 1 10` do fn=$(printf '%03d.png' $i) screencap -p $fn input touchscreen swipe 1000 1000 0 1000 sleep 1 done
If there is no seq, then you can:
i=0; while [ $(($i)) -le 10 ]; do i=$(($i + 1)); echo $i; screencap -p $i.png input touchscreen swipe 1000 1000 0 1000 sleep 1 done
10 change the number of pages in the book.
1. Run the Kindle application or Google Books (or any other application from which to copy)
2. Go to the shell on the android (adb / ssh)
3. Run the script
4. Waiting
')
We get all the pages in png format. Imagemagick process (if necessary) and glue to PDF. You can also skip through tesseract-ocr.
Thanks for attention.